class_docstr: TFMA benchmark.
class_docstr_tok: ["TFMA","benchmark","."]
code: def _transform_labels(self, labels):
      # Transform labels to [0, 1] so we can test metrics that require labels in
      # that range.
      if len(self._eval_config.model_specs) > 1:
          updated_labels = {}
          for s in self._eval_config.model_specs:
              updated_labels[s.name] = np.array(
                  [1.0 / (1.0 + x) for x in labels[s.name]]
              )
          return updated_labels
      else:
          return np.array([1.0 / (1.0 + x) for x in labels])
  
imports: import copy
  import time
  import apache_beam
  import numpy
  import tensorflow
  import tensorflow_model_analysis
  from tensorflow_model_analysis.evaluators import metrics_plots_and_validations_evaluator
  from tensorflow_model_analysis.evaluators import poisson_bootstrap
  from tensorflow_model_analysis.extractors import example_weights_extractor
  from tensorflow_model_analysis.extractors import features_extractor
  from tensorflow_model_analysis.extractors import labels_extractor
  from tensorflow_model_analysis.extractors import legacy_input_extractor
  from tensorflow_model_analysis.extractors import predictions_extractor
  from tensorflow_model_analysis.extractors import unbatch_extractor
  import tfx
  from tfx.benchmarks import benchmark_utils
  from tfx.benchmarks import benchmark_base
  from tfx_bsl.coders import example_coder
  from tfx_bsl.tfxio import record_based_tfxio
  from tfx_bsl.tfxio import test_util
label_desc: Use image node_id 10 for calling the TFMAV2BenchmarkBase obj's underlying member method code with example usage: obj._transform_labels(labels) and returns: updated_labels, np