def METHOD_NAME(pipeline_response: PipelineResponse, cls=None, error_map=None):
    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)
        raise HttpResponseError(response=response)
    if response.content:
        deserialized = response.json()
    else:
        deserialized = None
    if cls:
        return cls(pipeline_response, cast(str, deserialized), {})
    return cast(str, deserialized)