def METHOD_NAME(request):
    """
    A helper function for the extraction of HTTP Macaroon from a given request.
    Returns either a None if no macaroon could be found, or the string
    that represents our serialized macaroon.
    """
    authorization = request.headers.get("Authorization")
    if not authorization:
        return None
    try:
        auth_method, auth = authorization.split(" ", 1)
    except ValueError:
        return None
    if auth_method.lower() == "basic":
        return _extract_basic_macaroon(auth)
    elif auth_method.lower() == "token":
        return auth
    return None