class_docstr: Output handler to write detailed benchmark information to a stream.
class_docstr_tok: ["Output","handler","to","write","detailed","benchmark","information","to","a","stream","."]
docstr: :param t_input: Translator input.
  :param t_output: Translator output.
  :param t_walltime: Total walltime for translation.
docstr_tok: [":","param","t_input",":","Translator","input",".",":","param","t_output",":","Translator","output",".",":","param","t_walltime",":","Total","walltime","for","translation","."]
code: def handle(
      self,
      t_input: inference.TranslatorInput,
      t_output: inference.TranslatorOutput,
      t_walltime: float = 0.0,
  ):
      """
      :param t_input: Translator input.
      :param t_output: Translator output.
      :param t_walltime: Total walltime for translation.
      """
      print(
          "input=%s\toutput=%s\tinput_tokens=%d\toutput_tokens=%d\ttranslation_time=%0.4f"
          % (
              C.TOKEN_SEPARATOR.join(t_input.tokens),
              t_output.translation,
              len(t_input.tokens),
              len(t_output.tokens),
              t_walltime,
          ),
          file=self.stream,
          flush=True,
      )
  
imports: import json
  import sys
  from abc import ABC, abstractmethod
  from itertools import chain
  from typing import Optional
  import sockeye.constants
  from sockeye.utils import smart_open
  from .None import inference
label_desc: Use image node_id 1 for calling the BenchmarkOutputHandler obj's underlying member method code with example usage: obj.handle(t_input, t_output, t_walltime) without return types