code: def model_parse(model: type[_ModelT], data: Any) -> _ModelT:
      if PYDANTIC_V2:
          return model.model_validate(data)
      return model.parse_obj(data)
  
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 10 for calling a global function with example usage: model_parse(model, data) and returns: model, model