def METHOD_NAME():
    client = boto3.client("appsync", region_name="us-east-2")
    api_id = client.create_graphql_api(name="api1", authenticationType="API_KEY")[
        "graphqlApi"
    ]["apiId"]
    client.start_schema_creation(apiId=api_id, definition=schema.encode("utf-8"))
    with pytest.raises(ClientError) as exc:
        client.get_introspection_schema(apiId=api_id, format="NotAFormat")
    err = exc.value.response["Error"]
    assert err["Code"] == "BadRequestException"
    assert err["Message"] == "Invalid format NotAFormat given"