def METHOD_NAME(
    self,
    kind,  # type: Union[str, "models.Enum14"]
    direct_peering_type=None,  # type: Optional[Union[str, "models.Enum15"]]
    **kwargs  # type: Any
):
    # type: (...) -> "models.PeeringLocationListResult"
    """Lists all of the available peering locations for the specified kind of peering.
    :param kind: The kind of the peering.
    :type kind: str or ~azure.mgmt.peering.models.Enum14
    :param direct_peering_type: The type of direct peering.
    :type direct_peering_type: str or ~azure.mgmt.peering.models.Enum15
    :keyword callable cls: A custom type or function that will be passed the direct response
    :return: PeeringLocationListResult or the result of cls(response)
    :rtype: ~azure.mgmt.peering.models.PeeringLocationListResult
    :raises: ~azure.core.exceptions.HttpResponseError
    """
    cls = kwargs.pop('cls', None)  # type: ClsType["models.PeeringLocationListResult"]
    error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError})
    api_version = "2020-04-01"
    def prepare_request(next_link=None):
        if not next_link:
            # Construct URL
            url = self.METHOD_NAME.metadata['url']
            path_format_arguments = {
                'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
            }
            url = self._client.format_url(url, **path_format_arguments)
        else:
            url = next_link
        # Construct parameters
        query_parameters = {}  # type: Dict[str, Any]
        query_parameters['kind'] = self._serialize.query("kind", kind, 'str')
        if direct_peering_type is not None:
            query_parameters['directPeeringType'] = self._serialize.query("direct_peering_type", direct_peering_type, 'str')
        query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')
        # Construct headers
        header_parameters = {}  # type: Dict[str, Any]
        header_parameters['Accept'] = 'application/json'
        # Construct and send request
        request = self._client.get(url, query_parameters, header_parameters)
        return request
    def extract_data(pipeline_response):
        deserialized = self._deserialize('PeeringLocationListResult', pipeline_response)
        list_of_elem = deserialized.value
        if cls:
            list_of_elem = cls(list_of_elem)
        return deserialized.next_link or None, iter(list_of_elem)
    def get_next(next_link=None):
        request = prepare_request(next_link)
        pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
        response = pipeline_response.http_response
        if response.status_code not in [200]:
            error = self._deserialize(models.ErrorResponse, response)
            map_error(status_code=response.status_code, response=response, error_map=error_map)
            raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
        return pipeline_response
    return ItemPaged(
        get_next, extract_data
    )