code: def find_common_type(types):
      """
      Find a common data type among the given dtypes.
  
      Parameters
      ----------
      types : list of dtypes
  
      Returns
      -------
      pandas extension or numpy dtype
  
      See Also
      --------
      numpy.find_common_type
  
      """
      if not types:
          raise ValueError("no types given")
  
      first = types[0]
  
      # workaround for find_common_type([np.dtype('datetime64[ns]')] * 2)
      # => object
      if lib.dtypes_all_equal(list(types)):
          return first
  
      # get unique types (dict.fromkeys is used as order-preserving set())
      types = list(dict.fromkeys(types).keys())
  
      if any(isinstance(t, ExtensionDtype) for t in types):
          for t in types:
              if isinstance(t, ExtensionDtype):
                  res = t._get_common_dtype(types)
                  if res is not None:
                      return res
          return np.dtype("object")
  
      # take lowest unit
      if all(is_datetime64_dtype(t) for t in types):
          return np.dtype(max(types))
      if all(is_timedelta64_dtype(t) for t in types):
          return np.dtype(max(types))
  
      # don't mix bool / int or float or complex
      # this is different from numpy, which casts bool with float/int as int
      has_bools = any(is_bool_dtype(t) for t in types)
      if has_bools:
          for t in types:
              if (
                  is_integer_dtype(t)
                  or is_float_dtype(t)
                  or is_complex_dtype(t)
              ):
                  return np.dtype("object")
  
      return np_find_common_type(*types)
  
imports: from __future__ import annotations
  import datetime
  import functools
  from typing import TYPE_CHECKING, Any, Literal, Sized, TypeVar, cast, overload
  import warnings
  import numpy
  from pandas._libs import lib
  from pandas._libs.missing import NA, NAType, checknull
  from pandas._libs.tslibs import NaT, OutOfBoundsDatetime, OutOfBoundsTimedelta, Timedelta, Timestamp, get_unit_from_dtype, is_supported_unit
  from pandas._libs.tslibs.timedeltas import array_to_timedelta64
  from pandas._typing import ArrayLike, Dtype, DtypeObj, NumpyIndexT, Scalar, npt
  from pandas.errors import IntCastingNaNError, LossySetitemError
  from pandas.core.dtypes.common import ensure_int8, ensure_int16, ensure_int32, ensure_int64, ensure_object, ensure_str, is_bool, is_bool_dtype, is_complex, is_complex_dtype, is_datetime64_dtype, is_extension_array_dtype, is_float, is_float_dtype, is_integer, is_integer_dtype, is_numeric_dtype, is_object_dtype, is_scalar, is_signed_integer_dtype, is_string_dtype, is_timedelta64_dtype, is_unsigned_integer_dtype, pandas_dtype
  from pandas.core.dtypes.dtypes import BaseMaskedDtype, CategoricalDtype, DatetimeTZDtype, ExtensionDtype, IntervalDtype, PandasExtensionDtype, PeriodDtype
  from pandas.core.dtypes.generic import ABCExtensionArray, ABCIndex, ABCSeries
  from pandas.core.dtypes.inference import is_list_like
  from pandas.core.dtypes.missing import is_valid_na_for_dtype, isna, na_value_for_dtype, notna
  from pandas.io._util import _arrow_dtype_mapping
label_desc: Use image node_id 40 for calling a global function with example usage: find_common_type(types) and returns: np_find_common_type, first, np, np, np, np, res