code: def update(self, lm_loss, token_count=None, char_count=None):
      self.lm_losses.append(lm_loss)
      if self.char_level_ppl:
          self.token_count += token_count
          self.char_count += char_count
  
imports: import logging
  import os
  import numpy
  from attrdict import AttrMap
  from eval_tasks.eval_adapter import run_eval_harness
  from megatron.neox_arguments import NeoXArgs
  from torch.utils.tensorboard import SummaryWriter
  from determined.pytorch import MetricReducer, PyTorchCallback
label_desc: Use image node_id 2 for calling the LMReducers obj's underlying member method code with example usage: obj.update(lm_loss, token_count, char_count) without return types