class_docstr: Mapper for losses -> model type
class_docstr_tok: ["Mapper","for","losses","-",">","model","type"]
code: def register_loss(self, loss, model_type):
      if callable(loss):
          loss = loss.__name__
      self.__mapping.update({loss: model_type})
  
imports: import json
  from enum import Enum
  from typing import Union
  from pyspark.sql import Column
  import pyspark.sql.functions
label_desc: Use image node_id 3 for calling the LossModelTypeMapper obj's underlying member method code with example usage: obj.register_loss(loss, model_type) without return types