code: def _is_hierarchical(x):
      """
      Checks if the first item of an array-like object is also array-like
      If so, we have a MultiIndex and returns True. Else returns False.
      """
      item = x[0]
      # is there a better way to do this?
      if isinstance(
          item, (list, tuple, np.ndarray, pd.Series, pd.DataFrame)
      ):
          return True
      else:
          return False
  
imports: from statsmodels.compat.python import lrange, lzip
  import numpy
  import pandas
  import statsmodels.tools.data
  from pandas import Index, MultiIndex
label_desc: Use image node_id 5 for calling a global function with example usage: _is_hierarchical(x) and returns: True, False