code: def get_loss_fn(self, loss_type):
      if loss_type == "binary_cross_entropy_with_logits":
          return nn.functional.binary_cross_entropy_with_logits
      elif loss_type == "cross_entropy":
          return nn.functional.cross_entropy
      else:
          raise Exception(f"Unknown loss type: {loss_type}")
  
imports: import logging
  from copy import deepcopy
  from typing import Dict
  import torch
  from mmf.common.registry import registry
  from mmf.models import BaseModel
  from mmf.models.unit.unit_base_model import AttributeHead, build_detection_loss, MLP, UniTBaseModel
  from mmf.modules.encoders import TransformerEncoder
  from mmf.utils.distributed import byte_tensor_to_object
  from torch import nn, Tensor
label_desc: Use image node_id 12 for calling the UniT obj's underlying member method code with example usage: obj.get_loss_fn(loss_type) and returns: nn, nn