def METHOD_NAME(
    self,
    format: Union[str, "_models.JsonFormat"] = "json",
    *,
    ip_address: str,
    **kwargs: Any
) -> _models.IpAddressToLocationResult:
    """**Applies to:** see pricing `tiers <https://aka.ms/AzureMapsPricingTier>`_.
    This service will return the ISO country code for the provided IP address. Developers can use
    this information  to block or alter certain content based on geographical locations where the
    application is being viewed from.
    :param format: Desired format of the response. Only ``json`` format is supported. "json"
     Default value is "json".
    :type format: str or ~azure.maps.geolocation.models.JsonFormat
    :keyword ip_address: The IP address. Both IPv4 and IPv6 are allowed. Required.
    :paramtype ip_address: str
    :return: IpAddressToLocationResult
    :rtype: ~azure.maps.geolocation.models.IpAddressToLocationResult
    :raises ~azure.core.exceptions.HttpResponseError:
    """
    error_map = {
        401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
    }
    error_map.update(kwargs.pop('error_map', {}) or {})
    _headers = kwargs.pop("headers", {}) or {}
    _params = kwargs.pop("params", {}) or {}
    cls = kwargs.pop('cls', None)  # type: ClsType[_models.IpAddressToLocationResult]
    request = build_geolocation_get_location_request(
        format=format,
        ip_address=ip_address,
        client_id=self._config.client_id,
        api_version=self._config.api_version,
        headers=_headers,
        params=_params,
    )
    request.url = self._client.format_url(request.url)  # type: ignore
    pipeline_response = self._client._pipeline.run(  # type: ignore # pylint: disable=protected-access
        request,
        stream=False,
        **kwargs
    )
    response = pipeline_response.http_response
    if response.status_code not in [200]:
        map_error(status_code=response.status_code, response=response, error_map=error_map)
        error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response)
        raise HttpResponseError(response=response, model=error)
    deserialized = self._deserialize('IpAddressToLocationResult', pipeline_response)
    if cls:
        return cls(pipeline_response, deserialized, {})
    return deserialized