code: def testGetSourceWriter_writerNameTooLong(self):
      long_writer_name = "a" * (event_util._MAX_WRITER_NAME_LEN + 1)
      with mock.patch.object(
          logger, "error", autospec=True, spec_set=True
      ) as mock_log:
          actual_writer = event_util.GetSourceWriter(
              event_pb2.SourceMetadata(writer=long_writer_name)
          )
          self.assertIsNone(actual_writer)
      mock_log.assert_called_once_with(
          "Source writer name `%s` is too long, maximum allowed length is %d.",
          long_writer_name,
          event_util._MAX_WRITER_NAME_LEN,
      )
  
file_path: tensorboard/tensorboard/backend/event_processing/event_util_test.py
imports: from unittest import mock
  from tensorboard import test
  from tensorboard.backend.event_processing import event_util
  from tensorboard.compat.proto import event_pb2
  from tensorboard.util import tb_logging
label_desc: Use image node_id 5 for calling the EventUtilTest obj's underlying member method code with example usage: obj.testGetSourceWriter_writerNameTooLong() without return types