code: def check_loss_function(loss_function):
      loss_functions = {
          "rmse": loss_root_mean_square,
          "mse": mse,
          "mae": mae,
          "mad": mad,
          "r2": r2,
          "1-auc": loss_one_minus_auc,
          "auc": loss_one_minus_auc,  # semi backward compatibility
      }
      if isinstance(loss_function, str):
          loss_function = loss_functions[loss_function]
      elif loss_function is None:
          loss_function = loss_root_mean_square
  
      return loss_function
  
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 1 for calling a global function with example usage: check_loss_function(loss_function) and returns: loss_function