class_docstr: Plugin for understanding/debugging model inference.
    
class_docstr_tok: ["Plugin","for","understanding\/debugging","model","inference","."]
docstr: Returns JSON of the specified examples.
  
  Args:
    request: A request that should contain 'examples_path' and 'max_examples'.
  
  Returns:
    JSON of up to max_examples of the examples in the path.
code: def _examples_from_path_handler(self, request):
      """Returns JSON of the specified examples.
  
      Args:
        request: A request that should contain 'examples_path' and 'max_examples'.
  
      Returns:
        JSON of up to max_examples of the examples in the path.
      """
      start_example = (
          int(request.args.get("start_example"))
          if request.args.get("start_example")
          else 0
      )
      if not start_example:
          examples_count = int(request.args.get("max_examples"))
          examples_path = request.args.get("examples_path")
          sampling_odds = float(request.args.get("sampling_odds"))
          self.example_class = (
              tf.train.SequenceExample
              if request.args.get("sequence_examples") == "true"
              else tf.train.Example
          )
          try:
              platform_utils.throw_if_file_access_not_allowed(
                  examples_path, self._logdir, self._wit_data_dir
              )
              example_strings = platform_utils.example_protos_from_path(
                  examples_path,
                  examples_count,
                  parse_examples=False,
                  sampling_odds=sampling_odds,
                  example_class=self.example_class,
              )
              self.examples = [
                  self.example_class.FromString(ex)
                  for ex in example_strings
              ]
              self.generate_sprite(example_strings)
              self.updated_example_indices = set(
                  range(len(self.examples))
              )
          except common_utils.InvalidUserInputError as e:
              logger.error("Data loading error: %s", e.message)
              return http_util.Respond(
                  request, e.message, "application/json", code=400
              )
          except Exception as e:
              return http_util.Respond(
                  request, str(e), "application/json", code=400
              )
  
      # Split examples from start_example to + max_examples
      # Send next start_example if necessary
      end_example = start_example + MAX_EXAMPLES_TO_SEND
      json_examples = [
          json_format.MessageToJson(example)
          for example in self.examples[start_example:end_example]
      ]
      if end_example >= len(self.examples):
          end_example = -1
      return http_util.Respond(
          request,
          {
              "examples": json_examples,
              "sprite": True
              if (self.sprite and not start_example)
              else False,
              "next": end_example,
          },
          "application/json",
      )
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import copy
  import io
  import json
  import logging
  import math
  import numpy
  import os
  import werkzeug
  from werkzeug import wrappers
  from six.moves import xrange
  from google.protobuf import json_format
  from grpc.framework.interfaces.face.face import AbortionError
  from werkzeug import wrappers
  import tensorflow
  from tensorboard.backend import http_util
  from tensorboard.plugins import base_plugin
  from utils import common_utils
  from utils import inference_utils
  from utils import platform_utils
label_desc: Use image node_id 9 for calling the WhatIfToolPlugin obj's underlying member method code with example usage: obj._examples_from_path_handler(request) and returns: http_util, http_util, http_util