code: def check_method_loss_function(explainer, loss_function):
      if loss_function is not None:
          # user passed a function
          return loss_function
      elif explainer.model_type is None:
          # type is not known
          return "rmse"
      elif explainer.model_type == "regression":
          return "rmse"
      elif explainer.model_type == "classification":
          return "1-auc"
  
file_path: DALEX/python/dalex/dalex/aspect/_model_triplot/checks.py
imports: import numpy
  from warnings import warn
  from dalex.model_explanations._model_performance.utils import *
  from dalex.model_explanations._variable_importance.loss_functions import *
label_desc: Use image node_id 2 for calling a global function with example usage: check_method_loss_function(explainer, loss_function) and returns: loss_function, str, str, str