code: def testMakeTableExceptions(self):
      # Verify that contents is being type-checked and shape-checked.
      with self.assertRaises(ValueError):
          text_plugin.make_table([])
  
      with self.assertRaises(ValueError):
          text_plugin.make_table("foo")
  
      with self.assertRaises(ValueError):
          invalid_shape = np.full(
              (3, 3, 3), "nope", dtype=np.dtype("S3")
          )
          text_plugin.make_table(invalid_shape)
  
      # Test headers exceptions in 2d array case.
      test_array = np.full((3, 3), "foo", dtype=np.dtype("S3"))
      with self.assertRaises(ValueError):
          # Headers is wrong type.
          text_plugin.make_table(test_array, headers="foo")
      with self.assertRaises(ValueError):
          # Too many headers.
          text_plugin.make_table(
              test_array, headers=["foo", "bar", "zod", "zoink"]
          )
      with self.assertRaises(ValueError):
          # headers is 2d
          text_plugin.make_table(test_array, headers=test_array)
  
      # Also make sure the column counting logic works in the 1d array case.
      test_array = np.array(["foo", "bar", "zod"])
      with self.assertRaises(ValueError):
          # Too many headers.
          text_plugin.make_table(test_array, headers=test_array)
  
imports: import collections.abc
  import os
  import textwrap
  import numpy
  import tensorflow
  from tensorboard import plugin_util
  from tensorboard import context
  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.text import text_plugin
  from tensorboard.util import test_util
label_desc: Use image node_id 8 for calling the TextPluginTest obj's underlying member method code with example usage: obj.testMakeTableExceptions() without return types