def METHOD_NAME(context):
    """Create and Sign a JWT valid for AMO HTTP requests.
    Uses context.config 'jwt_user' and 'jwt_secret' and sets an expiration of
    4 minutes (AMO supports a max of 5)
    """
    amo_instance = get_amo_instance_config_from_scope(context)
    user = amo_instance["jwt_user"]
    secret = amo_instance["jwt_secret"]
    jti = str(uuid4())
    iat = int(time.time())
    exp = iat + 60 * 4  # AMO has a 5 minute max, so set this to 4 minutes after issued
    payload = {"iss": user, "jti": jti, "iat": iat, "exp": exp}
    token_str = jws.sign(payload, secret, algorithm="HS256")
    return token_str