code: def test_create_pet_with_bad_data(client, data):
      rv = client.post("/pets", json=data)
      assert rv.status_code == 422
      assert rv.json
  
file_path: apiflask/examples/test_examples.py
imports: import os
  import sys
  from importlib import reload
  import flask_sqlalchemy
  import pytest
label_desc: Use image node_id 6 for calling a global function with example usage: test_create_pet_with_bad_data(client, data) without return types