docstr: Tests `family` arg handling when scalar v2 is invoked.
docstr_tok: ["Tests","`","family","`","arg","handling","when","scalar","v2","is","invoked","."]
code: def test_scalar_summary_v2__family(self):
      """Tests `family` arg handling when scalar v2 is invoked."""
      with test.mock.patch.object(
          summary_v2, "scalar", autospec=True
      ) as mock_scalar_v2:
          with summary_ops_v2.create_summary_file_writer(
              self.get_temp_dir()
          ).as_default(step=1):
              tensor = summary_lib.scalar(
                  "float", constant_op.constant(2.5), family="otter"
              )
      # Returns empty string.
      self.assertEqual(tensor.numpy(), b"")
      self.assertEqual(tensor.dtype, dtypes.string)
      mock_scalar_v2.assert_called_once_with(
          name="otter/otter/float",
          data=constant_op.constant(2.5),
          step=1,
          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 4 for calling the SummaryV2Test obj's underlying member method code with example usage: obj.test_scalar_summary_v2__family() without return types