class_docstr: The interface of a mixin class.
docstr: Get an initialized loss.
  
  Parameters
  ----------
  loss_param
      given loss. If auto-inferred, apply get_loss. Otherwise, use
      loss_param as loss function directly
  name : str
      name of model, either "predictor" or "adversary"
docstr_tok: ["Get","an","initialized","loss",".","Parameters","--","--","--","--","--","loss_param","given","loss",".","If","auto-inferred",",","apply","get_loss",".","Otherwise",",","use","loss_param","as","loss","function","directly","name",":","str","name","of","model",",","either","``","predictor","''","or","``","adversary","''"]
code: def __init_loss__(self, loss_param, name):
      """
      Get an initialized loss.
  
      Parameters
      ----------
      loss_param
          given loss. If auto-inferred, apply get_loss. Otherwise, use
          loss_param as loss function directly
      name : str
          name of model, either "predictor" or "adversary"
      """
      if callable(loss_param):
          return loss_param
      elif isinstance(loss_param, str):
          return self.get_loss(loss_param)
      else:
          raise ValueError(_NO_LOSS.format(f"{name}_loss"))
  
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 3 for calling the BackendEngine obj's underlying member method code with example usage: obj.__init_loss__(loss_param, name) and returns: loss_param, self