code: def from_config(
      cls,
      config,
      metadata: CommonMetadata = None,
      tensorizers: Dict[str, Tensorizer] = None,
  ):
      if tensorizers is not None:
          return cls(
              tensorizers["actions"].vocab,
              [
                  ConsoleChannel(),
                  FileChannel((Stage.TEST,), config.output_path),
              ],
              config.text_column_name,
              tensorizers["tokens"].tokenizer,
          )
      actions_vocab = metadata.actions_vocab.itos
      return cls(
          actions_vocab,
          [
              ConsoleChannel(),
              FileChannel((Stage.TEST,), config.output_path),
          ],
      )
  
imports: from typing import Dict, List, Set, Union
  from pytext.common.constants import BatchContext, DatasetFieldName, Stage
  from pytext.data import CommonMetadata
  from pytext.data.data_structures.annotation import Intent, REDUCE, SHIFT, Slot, Token, Tree, TreeBuilder
  from pytext.data.tensorizers import Tensorizer
  from pytext.data.tokenizers import Tokenizer
  from pytext.metrics.intent_slot_metrics import compute_all_metrics, FramePredictionPair, Node, Span
  from .channel import Channel, ConsoleChannel, FileChannel
  from .metric_reporter import MetricReporter
label_desc: Use image node_id 2 for calling the CompositionalMetricReporter obj's underlying member method code with example usage: obj.from_config(cls, config, metadata, tensorizers) and returns: cls, cls