@classmethod
def _parse_production_url(cls, parsed_url, emulator_host):
    """Parses production URL like https://foo-bar.firebaseio.com/"""
    if parsed_url.scheme != 'https':
        raise ValueError(
            'Invalid database URL scheme: "{0}". Database URL must be an HTTPS URL.'
            .format(parsed_url.scheme))
    namespace = parsed_url.netloc.split('.')[0]
    if not namespace:
        raise ValueError(
            'Invalid database URL: "{0}". Database URL must be a valid URL to a Firebase Realtime Database instance.'
            .format(parsed_url.geturl()))
    if emulator_host:
        base_url = 'http://{0}'.format(emulator_host)
    else:
        base_url = 'https://{0}'.format(parsed_url.netloc)
    return base_url, namespace
