class_docstr: Calculates metrics for each language given tokenization info.
code: def _get_macro_compression_ratio(self, infos):
      return self._get_list_mean(infos["preserved_ratio"])
  
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 4 for calling the CalculateMetrics obj's underlying member method code with example usage: obj._get_macro_compression_ratio(infos) and returns: self