code: def calculate_metric(self):
      return compute_classification_metrics(
          list(
              itertools.chain.from_iterable(
                  (
                      LabelPrediction(s, p, e)
                      for s, p, e in zip(scores, pred, expect)
                  )
                  for scores, pred, expect in zip(
                      self.all_scores, self.all_preds, self.all_targets
                  )
              )
          ),
          self.label_names,
          self.calculate_loss(),
      )
  
file_path: pytext/demo/my_tagging/metric.py
imports: import itertools
  from pytext.metric_reporters.channel import ConsoleChannel, TensorBoardChannel
  from pytext.metric_reporters.metric_reporter import MetricReporter
  from pytext.metrics import compute_classification_metrics, LabelPrediction
label_desc: Use image node_id 4 for calling the MyTaggingMetricReporter obj's underlying member method code with example usage: obj.calculate_metric() and returns: compute_classification_metrics