code: def test_pathlib(self):
      import sys
  
      if sys.version_info.major == 2:
          import pathlib2 as pathlib
      else:
          import pathlib
      p = pathlib.Path("./pathlibtest")
      with SummaryWriter(p) as writer:
          writer.add_scalar("test", 1)
      import shutil
  
      shutil.rmtree(str(p))
  
file_path: tensorboardX/tests/test_summary_writer.py
imports: from tensorboardX import SummaryWriter
  import tempfile
  import unittest
label_desc: Use image node_id 5 for calling the SummaryWriterTest obj's underlying member method code with example usage: obj.test_pathlib() without return types