class_docstr: Simple Channel that prints results to console.
class_docstr_tok: ["Simple","Channel","that","prints","results","to","console","."]
code: def _print_loss(self, loss):
      if isinstance(loss, float):
          print(f"loss: {loss:.6f}")
      elif isinstance(loss, dict):
          for key in loss:
              print(f"{key}: {loss[key]:.6f}")
      else:
          raise Exception("Loss type not supported")
  
imports: import csv
  import sys
  import traceback
  from typing import Tuple
  import numpy
  import torch
  from numpy import linalg
  from pytext.common.constants import Stage
  from pytext.utils.file_io import PathManager
  from torch.utils.tensorboard import SummaryWriter
label_desc: Use image node_id 1 for calling the ConsoleChannel obj's underlying member method code with example usage: obj._print_loss(loss) without return types