code: def _get_type(data, assumption):
      """Get the type (binary, category, continuous) of the data under assump."""
      inferred = type_of_target(data)
      if inferred == "multilabel-indicator":
          #  Design choice: multiple binary columns are not supported.
          #                 multiple columns may only be one-hot encoding
          # FIXME provide warning and switch to binary2d
          # or not? because it could be multiple categorical... who knows!
          if not np_all(np_sum(data, axis=1) == 1):
              raise ValueError(_TYPE_CHECK_ERROR.format("category"))
          u = unique(data)
          if len(u) != 2 or (not isin([0, 1], u).all()):
              raise ValueError(_INVALID_OHE)
  
      # Match inferred with dist_assumption
      if inferred == "binary" and assumption in [
          "binary",
          "classification",
          "auto",
      ]:
          return "binary"
      elif inferred in [
          "multiclass",
          "multilabel-indicator",
      ] and assumption in [
          "category",
          "classification",
          "auto",
      ]:
          return "category"
      elif inferred in [
          "continuous",
          "continuous-multioutput",
      ] and assumption in [
          "continuous",
          "auto",
      ]:
          return "continuous"
      elif inferred == "multiclass-multioutput":
          raise NotImplementedError(
              "multiclass-multioutput not supported"
          )
          # NOTE we can actually implement this as concatenations of loss
          # functions, but that is up to the future user to decide for now.
      elif inferred == "unknown":
          raise ValueError(_TYPE_UNKNOWN_ERROR)
  
      raise ValueError(
          _TYPE_COMPLIANCE_ERROR.format(assumption, inferred)
      )
  
file_path: fairlearn/fairlearn/adversarial/_preprocessor.py
imports: import fairlearn.utils._compatibility
  from ._constants import _TYPE_COMPLIANCE_ERROR, _TYPE_CHECK_ERROR, _ARG_ERROR_MESSAGE, _TYPE_UNKNOWN_ERROR, _INVALID_OHE
  from sklearn.utils import check_array
  from sklearn.preprocessing import OneHotEncoder
  from pandas import Series, DataFrame
  from sklearn.base import BaseEstimator, TransformerMixin
  from sklearn.utils.multiclass import type_of_target
  from numpy import all
  from numpy import sum
  from numpy import unique, isin
label_desc: Use image node_id 1 for calling a global function with example usage: _get_type(data, assumption) and returns: str, str, str