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"
  
imports: from copy import deepcopy
  import numpy
  import warnings
label_desc: Use image node_id 3 for calling a global function with example usage: check_method_loss_function(explainer, loss_function) and returns: loss_function, str, str, str