code: def convert_json_field_to_pandas_type(field):
      """
      Converts a JSON field descriptor into its corresponding NumPy / pandas type
  
      Parameters
      ----------
      field
          A JSON field descriptor
  
      Returns
      -------
      dtype
  
      Raises
      -----
      ValueError
          If the type of the provided field is unknown or currently unsupported
  
      Examples
      --------
      >>> convert_json_field_to_pandas_type({'name': 'an_int',
                                             'type': 'integer'})
      'int64'
      >>> convert_json_field_to_pandas_type({'name': 'a_categorical',
                                             'type': 'any',
                                             'contraints': {'enum': [
                                                            'a', 'b', 'c']},
                                             'ordered': True})
      'CategoricalDtype(categories=['a', 'b', 'c'], ordered=True)'
      >>> convert_json_field_to_pandas_type({'name': 'a_datetime',
                                             'type': 'datetime'})
      'datetime64[ns]'
      >>> convert_json_field_to_pandas_type({'name': 'a_datetime_with_tz',
                                             'type': 'datetime',
                                             'tz': 'US/Central'})
      'datetime64[ns, US/Central]'
      """
      typ = field["type"]
      if typ == "string":
          return "object"
      elif typ == "integer":
          return "int64"
      elif typ == "number":
          return "float64"
      elif typ == "boolean":
          return "bool"
      elif typ == "duration":
          return "timedelta64"
      elif typ == "datetime":
          if field.get("tz"):
              return "datetime64[ns, {tz}]".format(tz=field["tz"])
          else:
              return "datetime64[ns]"
      elif typ == "any":
          if "constraints" in field and "ordered" in field:
              return CategoricalDtype(
                  categories=field["constraints"]["enum"],
                  ordered=field["ordered"],
              )
          else:
              return "object"
  
      raise ValueError(
          "Unsupported or invalid field type: {}".format(typ)
      )
  
file_path: catboost/contrib/python/pandas/py2/pandas/io/json/table_schema.py
imports: import warnings
  import pandas._libs.json
  from pandas.core.dtypes.common import is_bool_dtype, is_categorical_dtype, is_datetime64_dtype, is_datetime64tz_dtype, is_integer_dtype, is_numeric_dtype, is_period_dtype, is_string_dtype, is_timedelta64_dtype
  from pandas import DataFrame
  from pandas.api.types import CategoricalDtype
  import pandas.core.common
label_desc: Use image node_id 4 for calling a global function with example usage: convert_json_field_to_pandas_type(field) and returns: str, str, str, str, str, str, str, CategoricalDtype, str