class_docstr: The interface of a mixin class.
docstr: Get an initialized model.
  
  Parameters
  ----------
  model_param : list, self.model_class
      parameter that specifies the model
  loss_param
      loss function. If this is a str then it is auto-inferred and we
      can build a model here. If it is not a str then we cannot infer,
      and we will raise an error if model_param is a list
  X_features : int
      number of features in input variable
  y_features : int
      number of features in target variable
  name : str
      name of model, either "predictor" or "adversary"
docstr_tok: ["Get","an","initialized","model",".","Parameters","--","--","--","--","--","model_param",":","list",",","self.model_class","parameter","that","specifies","the","model","loss_param","loss","function",".","If","this","is","a","str","then","it","is","auto-inferred","and","we","can","build","a","model","here",".","If","it","is","not","a","str","then","we","can","not","infer",",","and","we","will","raise","an","error","if","model_param","is","a","list","X_features",":","int","number","of","features","in","input","variable","y_features",":","int","number","of","features","in","target","variable","name",":","str","name","of","model",",","either","``","predictor","''","or","``","adversary","''"]
code: def __init_model__(
      self, model_param, loss_param, X_features, y_features, name
  ):
      """
      Get an initialized model.
  
      Parameters
      ----------
      model_param : list, self.model_class
          parameter that specifies the model
      loss_param
          loss function. If this is a str then it is auto-inferred and we
          can build a model here. If it is not a str then we cannot infer,
          and we will raise an error if model_param is a list
      X_features : int
          number of features in input variable
      y_features : int
          number of features in target variable
      name : str
          name of model, either "predictor" or "adversary"
      """
      if isinstance(model_param, list):
          if not isinstance(loss_param, str):
              # Can not parse model as list when loss is undefined
              raise ValueError(
                  _LIST_MODEL_UNSUPPORTED.format(name, name)
              )
          predictor_list_nodes = (
              [X_features] + model_param + [y_features]
          )
          if loss_param == "binary":
              predictor_list_nodes.append("sigmoid")
          elif loss_param == "category":
              predictor_list_nodes.append("softmax")
  
          return self.get_model(list_nodes=predictor_list_nodes)
      elif issubclass(type(model_param), self.model_class):
          return model_param
      else:
          raise ValueError(
              _KWARG_ERROR_MESSAGE.format(
                  f"{name}_model", f"a list or a '{name}_model'"
              )
          )
  
file_path: fairlearn/fairlearn/adversarial/_backend_engine.py
imports: from ._constants import _KWARG_ERROR_MESSAGE, _NOT_IMPLEMENTED, _DIST_TYPE_NOT_IMPLEMENTED, _NO_LOSS, _LIST_MODEL_UNSUPPORTED
  from sklearn.utils import shuffle
  from numpy import ndarray
label_desc: Use image node_id 2 for calling the BackendEngine obj's underlying member method code with example usage: obj.__init_model__(model_param, loss_param, X_features, y_features, name) and returns: self, model_param