code: def test_update_pet(client):
      new_data = {"name": "Ghost", "category": "dog"}
  
      rv = client.patch("/pets/1", json=new_data)
      assert rv.status_code == 200
      assert rv.json
  
      rv = client.get("/pets/1")
      assert rv.status_code == 200
      if client._example == "base_response":
          data = rv.json["data"]
      else:
          data = rv.json
      assert data["name"] == new_data["name"]
      assert data["category"] == new_data["category"]
  
      rv = client.patch("/pets/13", json=new_data)
      assert rv.status_code == 404
      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 7 for calling a global function with example usage: test_update_pet(client) without return types