code: def model_json(
      model: pydantic.BaseModel, *, indent: int | None = None
  ) -> str:
      if PYDANTIC_V2:
          return model.model_dump_json(indent=indent)
      return model.json(indent=indent)
  
file_path: openai-python/src/openai/_compat.py
imports: from __future__ import annotations
  from typing import TYPE_CHECKING, Any, Union, TypeVar, cast
  from datetime import date, datetime
  import pydantic
  from pydantic.fields import FieldInfo
  from ._types import StrBytesIntFloat
label_desc: Use image node_id 8 for calling a global function with example usage: model_json(model) and returns: model, model