docstr: Write test data to disk, returning `(logdir, multiplexer)`.
docstr_tok: ["Write","test","data","to","disk",",","returning","`","(","logdir",",","multiplexer",")","`","."]
code: def _create_data(self):
      """Write test data to disk, returning `(logdir, multiplexer)`."""
      self.log_dir = tempfile.mkdtemp()
  
      # We use numpy.random to generate images. We seed to avoid non-determinism
      # in this test.
      numpy.random.seed(42)
  
      # Create old-style image summaries for run "foo".
      tf.compat.v1.reset_default_graph()
      sess = tf.compat.v1.Session()
      placeholder = tf.compat.v1.placeholder(tf.uint8)
      tf.compat.v1.summary.image(name="baz", tensor=placeholder)
      merged_summary_op = tf.compat.v1.summary.merge_all()
      foo_directory = os.path.join(self.log_dir, "foo")
      with test_util.FileWriterCache.get(foo_directory) as writer:
          writer.add_graph(sess.graph)
          for step in range(2):
              writer.add_summary(
                  sess.run(
                      merged_summary_op,
                      feed_dict={
                          placeholder: (
                              numpy.random.rand(1, 16, 42, 3) * 255
                          ).astype(numpy.uint8)
                      },
                  ),
                  global_step=step,
              )
  
      # Create new-style image summaries for run bar.
      tf.compat.v1.reset_default_graph()
      sess = tf.compat.v1.Session()
      placeholder = tf.compat.v1.placeholder(tf.uint8)
      summary.op(
          name="quux",
          images=placeholder,
          description="how do you pronounce that, anyway?",
      )
      merged_summary_op = tf.compat.v1.summary.merge_all()
      bar_directory = os.path.join(self.log_dir, "bar")
      with test_util.FileWriterCache.get(bar_directory) as writer:
          writer.add_graph(sess.graph)
          for step in range(2):
              writer.add_summary(
                  sess.run(
                      merged_summary_op,
                      feed_dict={
                          placeholder: (
                              numpy.random.rand(1, 8, 6, 3) * 255
                          ).astype(numpy.uint8)
                      },
                  ),
                  global_step=step,
              )
  
      # Start a server with the plugin.
      multiplexer = event_multiplexer.EventMultiplexer(
          {
              "foo": foo_directory,
              "bar": bar_directory,
          }
      )
      multiplexer.Reload()
      return (self.log_dir, multiplexer)
  
imports: import collections.abc
  import json
  import os
  import shutil
  import tempfile
  import urllib.parse
  import numpy
  import tensorflow
  from werkzeug import test
  from werkzeug import wrappers
  from tensorboard.backend import application
  from tensorboard.backend.event_processing import data_provider
  from tensorboard.backend.event_processing import plugin_event_multiplexer
  from tensorboard.plugins import base_plugin
  from tensorboard.plugins.image import summary
  from tensorboard.plugins.image import images_plugin
  from tensorboard.util import test_util
label_desc: Use image node_id 2 for calling the ImagesPluginTest obj's underlying member method code with example usage: obj._create_data() and returns: self,  multiplexer