class_docstr: Tests the TensorBoard program.
code: def test_should_use_data_server(self):
      def f(**kwargs):
          kwargs.setdefault("logdir", "")
          kwargs.setdefault("logdir_spec", "")
          kwargs.setdefault("detect_file_replacement", None)
          flags = argparse.Namespace()
          for k, v in kwargs.items():
              setattr(flags, k, v)
          return program._should_use_data_server(flags)
  
      self.assertFalse(f())
      self.assertFalse(f(logdir_spec="a:foo,b:bar"))
      self.assertTrue(f(logdir="logs/mnist/"))
      self.assertTrue(f(logdir="gs://logs"))
      self.assertFalse(f(logdir="notgs://logs"))
      self.assertFalse(f(logdir="foo", detect_file_replacement=True))
  
imports: import argparse
  import io
  import sys
  from unittest import mock
  from tensorboard import program
  from tensorboard import test
  from tensorboard.plugins import base_plugin
  from tensorboard.plugins.core import core_plugin
label_desc: Use image node_id 7 for calling the TensorBoardTest obj's underlying member method code with example usage: obj.test_should_use_data_server() and returns: program