code: def test_error_message(self):
      current_access = csan.Access(
          type=csan.AccessType.WRITE,
          seq_num=1,
          stream=stream_id(1),
          operator="schema",
          aliases=["b"],
          is_output=True,
          stack_trace=traceback.StackSummary.from_list(
              [("file", 0, "name", "trace a")]
          ),
      )
      previous_access = csan.Access(
          type=csan.AccessType.READ,
          seq_num=2,
          stream=stream_id(0),
          operator="schema",
          aliases=["a"],
          is_output=False,
          stack_trace=traceback.StackSummary.from_list(
              [("file", 0, "name", "trace b")]
          ),
      )
      error = csan.UnsynchronizedAccessError(
          data_ptr=tensor_id(1),
          allocation_stack_trace=traceback.StackSummary.from_list(
              [("file", 0, "name", "alloc")]
          ),
          current_access=current_access,
          previous_access=previous_access,
      )
      self.assertEqual(
          str(error),
          textwrap.dedent(
              """\
                  ============================
                  CSAN detected a possible data race on tensor with data pointer 1
                  Access by stream 1001 during kernel:
                  schema
                  writing to argument(s) b, and to the output
                  With stack trace:
                    File "file", line 0, in name
                      trace a
  
                  Previous access by stream 1000 during kernel:
                  schema
                  reading from argument(s) a
                  With stack trace:
                    File "file", line 0, in name
                      trace b
  
                  Tensor was allocated with stack trace:
                    File "file", line 0, in name
                      alloc
                  """
          ),
      )
  
imports: import sys
  import textwrap
  import traceback
  from typing import List
  import torch
  import torch.cuda._sanitizer
  from torch.cuda._sanitizer import StreamId, DataPtr, EventId
  from torch.testing._internal.common_utils import TestCase, run_tests, NoTest, TEST_CUDA
label_desc: Use image node_id 4 for calling the TestMessages obj's underlying member method code with example usage: obj.test_error_message() without return types