code: def get_pet(pet_id):
      if pet_id > len(pets) - 1 or pets[pet_id].get("deleted"):
          abort(404)
      return pets[pet_id]
  
file_path: apiflask/examples/dataclass/app.py
imports: from dataclasses import field
  from marshmallow_dataclass import dataclass
  from apiflask import APIFlask, abort
  from apiflask.validators import Length, OneOf
label_desc: Use image node_id 2 for calling a global function with example usage: get_pet(pet_id) and returns: pets