docstr: Tests histogram v2 invocation.
docstr_tok: ["Tests","histogram","v2","invocation","."]
code: def test_histogram_summary_v2(self):
      """Tests histogram v2 invocation."""
      with test.mock.patch.object(
          summary_v2, "histogram", autospec=True
      ) as mock_histogram_v2:
          with summary_ops_v2.create_summary_file_writer(
              self.get_temp_dir()
          ).as_default(step=3):
              i = array_ops.ones((1024,))
              tensor = summary_lib.histogram(
                  "histogram", i, family="family"
              )
      # Returns empty string.
      self.assertEqual(tensor.numpy(), b"")
      self.assertEqual(tensor.dtype, dtypes.string)
      mock_histogram_v2.assert_called_once_with(
          name="family/family/histogram",
          data=i,
          step=3,
          buckets=test.mock.ANY,
          description=test.mock.ANY,
      )
  
imports: from tensorboard.summary import v2
  from tensorflow.python.framework import constant_op
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import ops
  from tensorflow.python.framework import test_util
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import summary_ops_v2
  from tensorflow.python.platform import test
  from tensorflow.python.summary import summary
  from tensorflow.python.training import training_util
label_desc: Use image node_id 8 for calling the SummaryV2Test obj's underlying member method code with example usage: obj.test_histogram_summary_v2() without return types