code: def enable_data_resource_formatter(enable: bool) -> None:
      if "IPython" not in sys.modules:
          # definitely not in IPython
          return
      from IPython import get_ipython
  
      ip = get_ipython()
      if ip is None:
          # still not in IPython
          return
  
      formatters = ip.display_formatter.formatters
      mimetype = "application/vnd.dataresource+json"
  
      if enable:
          if mimetype not in formatters:
              # define tableschema formatter
              from IPython.core.formatters import BaseFormatter
              from traitlets import ObjectName
  
              class TableSchemaFormatter(BaseFormatter):
                  print_method = ObjectName("_repr_data_resource_")
                  _return_type = (dict,)
  
              # register it:
              formatters[mimetype] = TableSchemaFormatter()
          # enable it if it's been disabled:
          formatters[mimetype].enabled = True
      else:
          # unregister tableschema mime-type
          if mimetype in formatters:
              formatters[mimetype].enabled = False
  
file_path: catboost/contrib/python/pandas/py3/pandas/io/formats/printing.py
imports: from __future__ import annotations
  import sys
  from typing import Any, Callable, Dict, Iterable, Mapping, Sequence, TypeVar, Union
  from pandas._config import get_option
  from pandas.core.dtypes.inference import is_sequence
label_desc: Use image node_id 7 for calling a global function with example usage: enable_data_resource_formatter(enable) without return types