docstr: Tests scalar v2 invocation with no writer.
docstr_tok: ["Tests","scalar","v2","invocation","with","no","writer","."]
code: def test_scalar_summary_v2__wo_writer(self):
      """Tests scalar v2 invocation with no writer."""
      with self.assertWarnsRegex(
          UserWarning, "default summary writer not found"
      ):
          with test.mock.patch.object(
              summary_v2, "scalar", autospec=True
          ) as mock_scalar_v2:
              summary_lib.scalar("float", constant_op.constant(2.5))
      mock_scalar_v2.assert_not_called()
  
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 2 for calling the SummaryV2Test obj's underlying member method code with example usage: obj.test_scalar_summary_v2__wo_writer() without return types