code: def is_period_arraylike(arr):
      """
      Check whether an array-like is a periodical array-like or PeriodIndex.
  
      Parameters
      ----------
      arr : array-like
          The array-like to check.
  
      Returns
      -------
      boolean : Whether or not the array-like is a periodical
                array-like or PeriodIndex instance.
  
      Examples
      --------
      >>> is_period_arraylike([1, 2, 3])
      False
      >>> is_period_arraylike(pd.Index([1, 2, 3]))
      False
      >>> is_period_arraylike(pd.PeriodIndex(["2017-01-01"], freq="D"))
      True
      """
  
      if isinstance(arr, (ABCPeriodIndex, ABCPeriodArray)):
          return True
      elif isinstance(arr, (np.ndarray, ABCSeries)):
          return is_period_dtype(arr.dtype)
      return getattr(arr, "inferred_type", None) == "period"
  
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 20 for calling a global function with example usage: is_period_arraylike(arr) and returns: unknown, True, is_period_dtype