code: def __init__(self, cfg: Any):
      super().__init__()
      self.cfg = cfg
      self.loss_fn = nn.CrossEntropyLoss()
  
file_path: h2o-llmstudio/llm_studio/src/losses/text_causal_language_modeling_losses.py
imports: import logging
  from typing import Any, KeysView
  from torch import nn
label_desc: Use image node_id 1 to create a new SampleAveragedCrossEntropyLoss object from inherited base classes: nn with example: obj = SampleAveragedCrossEntropyLoss(cfg)