class_docstr: WIT widget base class for common code between Jupyter and Colab.
docstr: Performs mutant inference on specified examples.
docstr_tok: ["Performs","mutant","inference","on","specified","examples","."]
code: def infer_mutants_impl(self, info):
      """Performs mutant inference on specified examples."""
      example_index = int(info["example_index"])
      feature_name = info["feature_name"]
      examples = (
          self.examples
          if example_index == -1
          else [self.examples[example_index]]
      )
      examples = [self.json_to_proto(ex) for ex in examples]
      scan_examples = [
          self.json_to_proto(ex) for ex in self.examples[0:50]
      ]
      serving_bundles = []
      serving_bundles.append(
          inference_utils.ServingBundle(
              self.config.get("inference_address"),
              self.config.get("model_name"),
              self.config.get("model_type"),
              self.config.get("model_version"),
              self.config.get("model_signature"),
              self.config.get("uses_predict_api"),
              self.config.get("predict_input_tensor"),
              self.config.get("predict_output_tensor"),
              self.estimator_and_spec.get("estimator"),
              self.estimator_and_spec.get("feature_spec"),
              self.custom_predict_fn,
          )
      )
      if (
          "inference_address_2" in self.config
          or self.compare_estimator_and_spec.get("estimator")
          or self.compare_custom_predict_fn
      ):
          serving_bundles.append(
              inference_utils.ServingBundle(
                  self.config.get("inference_address_2"),
                  self.config.get("model_name_2"),
                  self.config.get("model_type"),
                  self.config.get("model_version_2"),
                  self.config.get("model_signature_2"),
                  self.config.get("uses_predict_api"),
                  self.config.get("predict_input_tensor"),
                  self.config.get("predict_output_tensor"),
                  self.compare_estimator_and_spec.get("estimator"),
                  self.compare_estimator_and_spec.get("feature_spec"),
                  self.compare_custom_predict_fn,
              )
          )
      viz_params = inference_utils.VizParams(
          info["x_min"],
          info["x_max"],
          scan_examples,
          10,
          info["feature_index_pattern"],
      )
      self.running_mutant_infer = True
      charts = inference_utils.mutant_charts_for_feature(
          examples, feature_name, serving_bundles, viz_params
      )
      self.running_mutant_infer = False
      return charts
  
imports: import base64
  import json
  import googleapiclient.discovery
  import os
  import logging
  import multiprocessing
  import tensorflow
  from IPython import display
  from google.protobuf import json_format
  from numbers import Number
  from oauth2client.client import GoogleCredentials
  from six import ensure_str
  from six import integer_types
  from utils import inference_utils
label_desc: Use image node_id 7 for calling the WitWidgetBase obj's underlying member method code with example usage: obj.infer_mutants_impl(info) and returns: charts