code: def from_config(cls, loss_config: AttrDict) -> "DistillationLoss":
      return cls(
          soft_target_alpha=loss_config["soft_target_alpha"],
          temperature=loss_config["temperature"],
          loss_type=loss_config.get("loss_type", "kl_divergence"),
      )
  
imports: from enum import Enum
  import torch
  import torch.nn
  import torch.nn.functional
  from classy_vision.losses import ClassyLoss, register_loss
  from vissl.config.attr_dict import AttrDict
  from vissl.losses.cross_entropy_multiple_output_single_target import SmoothCrossEntropy
label_desc: Use image node_id 2 for calling the DistillationLoss obj's underlying member method code with example usage: obj.from_config(cls, loss_config) and returns: cls