code: def from_config(cls, config: PyTextConfig, pad_index: int = -1):
      return cls(channels=[ConsoleChannel()], pad_index=pad_index)
  
file_path: pytext/pytext/metric_reporters/calibration_metric_reporter.py
imports: from typing import Any, Dict, List
  from pytext.config import PyTextConfig
  from pytext.metric_reporters.channel import Channel, ConsoleChannel
  from pytext.metrics import LabelPrediction
  from pytext.metrics.calibration_metrics import compute_calibration
  from torch import Tensor
  from .metric_reporter import MetricReporter
label_desc: Use image node_id 2 for calling the CalibrationMetricReporter obj's underlying member method code with example usage: obj.from_config(cls, config, pad_index) and returns: cls