docstr: Tests image v2 invocation.
docstr_tok: ["Tests","image","v2","invocation","."]
code: def test_image_summary_v2(self):
      """Tests image v2 invocation."""
      with test.mock.patch.object(
          summary_v2, "image", autospec=True
      ) as mock_image_v2:
          with summary_ops_v2.create_summary_file_writer(
              self.get_temp_dir()
          ).as_default(step=2):
              i = array_ops.ones((5, 4, 4, 3))
              with ops.name_scope_v2("outer"):
                  tensor = summary_lib.image(
                      "image", i, max_outputs=3, family="family"
                  )
      # Returns empty string.
      self.assertEqual(tensor.numpy(), b"")
      self.assertEqual(tensor.dtype, dtypes.string)
      mock_image_v2.assert_called_once_with(
          name="family/outer/family/image",
          data=i,
          step=2,
          max_outputs=3,
          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 7 for calling the SummaryV2Test obj's underlying member method code with example usage: obj.test_image_summary_v2() without return types