private function emulatorGapicConfig($emulatorHost)
    {
        // Strip the URL scheme from the input, if it was provided.
        if ($scheme = parse_url($emulatorHost, PHP_URL_SCHEME)) {
            $search = $scheme . '://';
            $emulatorHost = str_replace($search, '', $emulatorHost);
        }

        return [
            'serviceAddress' => $emulatorHost,
            'transportConfig' => [
                'grpc' => [
                    'stubOpts' => [
                        'credentials' => \Grpc\ChannelCredentials::createInsecure()
                    ]
                ]
            ]
        ];
    }