code: def create_pet(pet: PetIn):
      pet_id = len(pets)
      pets.append(
          {"id": pet_id, "name": pet.name, "category": pet.category}
      )
      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 4 for calling a global function with example usage: create_pet(pet) and returns: pets