code: def is_datetimelike(arr):
      """
      Check whether an array-like is a datetime-like array-like.
  
      Acceptable datetime-like objects are (but not limited to) datetime
      indices, periodic indices, and timedelta indices.
  
      Parameters
      ----------
      arr : array-like
          The array-like to check.
  
      Returns
      -------
      boolean : Whether or not the array-like is a datetime-like array-like.
  
      Examples
      --------
      >>> is_datetimelike([1, 2, 3])
      False
      >>> is_datetimelike(pd.Index([1, 2, 3]))
      False
      >>> is_datetimelike(pd.DatetimeIndex([1, 2, 3]))
      True
      >>> is_datetimelike(pd.DatetimeIndex([1, 2, 3], tz="US/Eastern"))
      True
      >>> is_datetimelike(pd.PeriodIndex([], freq="A"))
      True
      >>> is_datetimelike(np.array([], dtype=np.datetime64))
      True
      >>> is_datetimelike(pd.Series([], dtype="timedelta64[ns]"))
      True
      >>>
      >>> dtype = DatetimeTZDtype("ns", tz="US/Eastern")
      >>> s = pd.Series([], dtype=dtype)
      >>> is_datetimelike(s)
      True
      """
  
      return (
          is_datetime64_dtype(arr)
          or is_datetime64tz_dtype(arr)
          or is_timedelta64_dtype(arr)
          or isinstance(arr, ABCPeriodIndex)
      )
  
imports: import warnings
  import numpy
  from pandas._libs import algos, lib
  from pandas._libs.tslibs import conversion
  from pandas.compat import PY3, PY36, string_types
  from pandas.core.dtypes.dtypes import CategoricalDtype, DatetimeTZDtype, ExtensionDtype, IntervalDtype, PandasExtensionDtype, PeriodDtype, registry
  from pandas.core.dtypes.generic import ABCCategorical, ABCDateOffset, ABCDatetimeIndex, ABCIndexClass, ABCPeriodArray, ABCPeriodIndex, ABCSeries
  from pandas.core.dtypes.inference import is_array_like, is_bool, is_complex, is_decimal, is_dict_like, is_file_like, is_float, is_hashable, is_integer, is_interval, is_iterator, is_list_like, is_named_tuple, is_nested_list_like, is_number, is_re, is_re_compilable, is_scalar, is_sequence, is_string_like
label_desc: Use image node_id 22 for calling a global function with example usage: is_datetimelike(arr) and returns: unknown