def extract_request(mock_method):
    """Pull out the request object from the last call to the mocked method

    req = extract_request(session.search_items)
    """
    args, kwargs = mock_method.call_args
    *_, request = args
    return request