code: def get_dtype(obj) -> DtypeObj:
      if isinstance(obj, DataFrame):
          # Note: we are assuming only one column
          return obj.dtypes.iat[0]
      else:
          return obj.dtype
  
imports: from __future__ import annotations
  from typing import TYPE_CHECKING
  from pandas import DataFrame
label_desc: Use image node_id 1 for calling a global function with example usage: get_dtype(obj) and returns: obj, obj