code: def enumerate_data(X: modALinput):
      """
      for i, x in enumerate_data(X):
  
      Depending on the data type of X, returns:
  
      * A 1xM matrix in case of scipy sparse NxM matrix X
      * pandas series in case of a pandas data frame X
      * row in case of list or numpy format
      """
      if sp.issparse(X):
          return enumerate(X.tocsr())
      elif isinstance(X, pd.DataFrame):
          return X.iterrows()
      elif isinstance(X, np.ndarray) or isinstance(X, list):
          # numpy arrays and lists can readily be enumerated
          return enumerate(X)
  
      raise TypeError("%s datatype is not supported" % type(X))
  
file_path: modAL/modAL/utils/data.py
imports: from typing import List, Sequence, Union
  import numpy
  import pandas
  import scipy.sparse
label_desc: Use image node_id 6 for calling a global function with example usage: enumerate_data(X) and returns: enumerate, X, enumerate