private function emulatorBaseUri($emulatorHost)
    {
        $emulatorUriComponents = parse_url($emulatorHost);
        $emulatorUriComponents = array_merge(['scheme' => 'http', 'port' => ''], $emulatorUriComponents);
        $baseUri = "{$emulatorUriComponents['scheme']}://{$emulatorUriComponents['host']}";
        $baseUri .= $emulatorUriComponents['port'] ? ":{$emulatorUriComponents['port']}/" : '/';

        return $baseUri;
    }