code: def _maybe_statsmodels_data(data, target):
      try:
          import statsmodels.datasets as datasets
  
          if isinstance(data, datasets.utils.Dataset):
              if target is not None:
                  raise ValueError(
                      "'target' can't be specified for sklearn.datasets"
                  )
  
              # this should be first
              try:
                  target_name = getattr(data, "endog_name", None)
                  target = pd.Series(data.endog, name=target_name)
              except AttributeError:
                  target = None
              try:
                  columns = getattr(data, "exog_name", None)
                  if hasattr(data, "censors"):
                      data = {
                          columns[0]: data.censors,
                          columns[1]: data.exog,
                      }
                      # hack for "heart" dataset
                      data = pd.DataFrame(data, columns=columns)
                  else:
                      data = pd.DataFrame(data.exog, columns=columns)
              except AttributeError:
                  raise ValueError(
                      "Unable to read statsmodels Dataset without exog"
                  )
  
              return data, target
      except ImportError:
          pass
  
      return data, target
  
file_path: pandas-ml/pandas_ml/smaccessors/base.py
imports: import pandas
  from pandas_ml.core import base
label_desc: Use image node_id 1 for calling a global function with example usage: _maybe_statsmodels_data(data, target) and returns: data,  target, data,  target