class_docstr: Calculates metrics for each language given tokenization info.
code: def process(self, info_dict):
      for lang in info_dict.keys():
          infos = info_dict[lang]
          yield {
              "lang": lang,
              "sample_count": infos["count"],
              "micro_drop_char_percent": self._format_float_or_none(
                  self._get_micro_dropped_char_percent(infos)
              ),
              "macro_drop_char_percent": self._format_float_or_none(
                  self._get_macro_dropped_char_percent(infos)
              ),
              "micro_compress_ratio": self._format_float_or_none(
                  self._get_micro_compression_ratio(infos)
              ),
              "macro_compress_ratio": self._format_float_or_none(
                  self._get_macro_compression_ratio(infos)
              ),
              "unweighted_en_wp_overlap_percent": self._format_float_or_none(
                  self._get_wordpiece_overlap_percent(
                      infos["wordpieces"],
                      info_dict["en"]["wordpieces"],
                      weighted=False,
                  )
              ),
              "weighted_en_wp_overlap_percent": self._format_float_or_none(
                  self._get_wordpiece_overlap_percent(
                      infos["wordpieces"],
                      info_dict["en"]["wordpieces"],
                      weighted=True,
                  )
              ),
          }
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import collections
  import apache_beam
  import tensorflow.compat.v1
  from tensorflow_text.python.ops.bert_tokenizer import BertTokenizer
  from tensorflow_text.python.ops.wordpiece_tokenizer import WordpieceTokenizer
  from tensorflow_text.tools.wordpiece_vocab import wordpiece_tokenizer_learner_lib
label_desc: Use image node_id 1 for calling the CalculateMetrics obj's underlying member method code with example usage: obj.process(info_dict) without return types