code: def get_number_of_types(dataframe):
      dtypes = getattr(dataframe, "dtypes", None)
      try:
          return len(set(dtypes))
      except TypeError:
          return 1
  
imports: import os
  import sys
  import threading
  import warnings
  from functools import wraps
  from inspect import Parameter, signature
  from multiprocessing import cpu_count
  from numbers import Integral
  from typing import Any, Callable, Tuple
  from warnings import warn
  import numpy
  import threadpoolctl
  from numpy.lib.recfunctions import require_fields
  from sklearn import __version__
  from daal4py import _get__daal_link_version__
  from daal4py import daalinit
  from daal4py import num_threads
  import logging
label_desc: Use image node_id 12 for calling a global function with example usage: get_number_of_types(dataframe) and returns: len, int