code: def check_data_type(data: DataType) -> None:
      if not isinstance(data, (dict, pd.DataFrame)) and not any(
          hasattr(data, attr)
          for attr in ["__geo_interface__", "__dataframe__"]
      ):
          raise TypeError(
              "Expected dict, DataFrame or a __geo_interface__ attribute, got: {}".format(
                  type(data)
              )
          )
  
imports: import json
  import os
  import random
  import hashlib
  import warnings
  from typing import Union, MutableMapping, Optional, Dict, Sequence, TYPE_CHECKING, List
  import pandas
  from toolz import curried
  from typing import TypeVar
  from ._importers import import_pyarrow_interchange
  from .core import sanitize_dataframe, sanitize_arrow_table, DataFrameLike
  from .core import sanitize_geo_interface
  from .deprecation import AltairDeprecationWarning
  from .plugin_registry import PluginRegistry
  from typing import Protocol, TypedDict, Literal
label_desc: Use image node_id 6 for calling a global function with example usage: check_data_type(data) without return types