code: def get_pet(pet_id):
      return db.get_or_404(PetModel, pet_id)
  
file_path: apiflask/examples/pagination/app.py
imports: import random
  from flask_sqlalchemy import SQLAlchemy
  from apiflask import APIFlask, Schema, PaginationSchema, pagination_builder
  from apiflask.fields import Integer, String, List, Nested
  from apiflask.validators import Range
label_desc: Use image node_id 3 for calling a global function with example usage: get_pet(pet_id) and returns: db