# Path: geopy/exc.py
# class GeocoderParseError(GeocoderServiceError):
#     """
#     Geopy could not parse the service's response. This is probably due
#     to a bug in geopy.
#     """


from geopy.exc import GeocoderParseError
    import pytz
try:
    pytz_available = True
except ImportError:
    pytz_available = False


__all__ = (
    "Timezone",
)


def ensure_pytz_is_installed():
    if not pytz_available:
        raise ImportError(
            'pytz must be installed in order to locate timezones. '
            'If geopy has been installed with `pip`, then pytz can be '
            'installed with `pip install "geopy[timezone]"`.'
        )


def from_timezone_name(timezone_name, raw):
    ensure_pytz_is_installed()
    try:
        pytz_timezone = pytz.timezone(timezone_name)
    except pytz.UnknownTimeZoneError:
        raise GeocoderParseError(
            "pytz could not parse the timezone identifier (%s) "
            "returned by the service." % timezone_name
        )
    except KeyError:

# Path: geopy/exc.py
# class GeocoderParseError(GeocoderServiceError):
#     """
#     Geopy could not parse the service's response. This is probably due
#     to a bug in geopy.
#     """


# Path: geopy/timezone.py
from geopy.exc import GeocoderParseError
    import pytz

try:
    pytz_available = True
except ImportError:
    pytz_available = False


__all__ = (
    "Timezone",
)


def ensure_pytz_is_installed():
    if not pytz_available:
        raise ImportError(
            'pytz must be installed in order to locate timezones. '
            'If geopy has been installed with `pip`, then pytz can be '
            'installed with `pip install "geopy[timezone]"`.'
        )


def from_timezone_name(timezone_name, raw):
    ensure_pytz_is_installed()
    try:
        pytz_timezone = pytz.timezone(timezone_name)
    except pytz.UnknownTimeZoneError:
        raise GeocoderParseError(
            "pytz could not parse the timezone identifier (%s) "
            "returned by the service." % timezone_name
        )
    except KeyError:

        raise GeocoderParseError(