def METHOD_NAME():
    client = boto3.client("apigateway", region_name="us-east-2")
    api_id = client.create_rest_api(name="my_api", description="d")["id"]
    resp = client.put_gateway_response(
        restApiId=api_id,
        responseType="DEFAULT_4XX",
        statusCode="401",
        responseParameters={"gatewayresponse.header.Authorization": "'Basic'"},
        responseTemplates={
            "application/xml": "#set($inputRoot = $input.path('$'))\n{ }"
        },
    )
    assert resp["responseType"] == "DEFAULT_4XX"
    assert resp["defaultResponse"] is False
    assert resp["statusCode"] == "401"
    assert resp["responseParameters"] == {
        "gatewayresponse.header.Authorization": "'Basic'"
    }
    assert resp["responseTemplates"] == {
        "application/xml": "#set($inputRoot = $input.path('$'))\n{ }"
    }