class_docstr: A class that implements an event writer that supports concurrent logging and global logging across
  different modules.
  
  The GlobalSummaryWriter class provides a set of API to write TensorBoard events from different processes.
  The writer instance can be accessed from different processes or modules. Also, the instance maintains
  the ``global_step`` value itself so that the interleaved requests to write an event will not conflict
  each other. This ensures that the resulting event file is TensorBoard compatible.
  With GlobalSummaryWriter, you can easily log the metrics of your parallel-trained model.
  The GlobalSummaryWriter and also be used like the ``logging`` module of Python.
  See how ``getSummaryWriter`` is used below.
docstr: Get the writer from global namespace.
  
  Examples::
  
      # main.py
      import global_1
      import global_2
  
      # global1.py
      from tensorboardX import GlobalSummaryWriter
      writer = GlobalSummaryWriter.getSummaryWriter()  # This creates a new instance.
      writer.add_text('my_log', 'greeting from global1')
  
      # global2.py
      from tensorboardX import GlobalSummaryWriter
      writer = GlobalSummaryWriter.getSummaryWriter()  # Get the instance in global1.py.
      writer.add_text('my_log', 'greeting from global2')
code: def getSummaryWriter():
      """Get the writer from global namespace.
  
      Examples::
  
          # main.py
          import global_1
          import global_2
  
          # global1.py
          from tensorboardX import GlobalSummaryWriter
          writer = GlobalSummaryWriter.getSummaryWriter()  # This creates a new instance.
          writer.add_text('my_log', 'greeting from global1')
  
          # global2.py
          from tensorboardX import GlobalSummaryWriter
          writer = GlobalSummaryWriter.getSummaryWriter()  # Get the instance in global1.py.
          writer.add_text('my_log', 'greeting from global2')
  
      """
      global _writer
      if not hasattr(_writer, "smw") or _writer.smw is None:
          _writer = GlobalSummaryWriter()
  
      print(
          "Using the global logger in:",
          _writer.smw.file_writer.get_logdir(),
      )
      return _writer
  
file_path: tensorboardX/tensorboardX/global_writer.py
imports: from .writer import SummaryWriter
  from multiprocessing import Value
  import multiprocessing
label_desc: Use image node_id 5 for calling the GlobalSummaryWriter obj's underlying member method code with example usage: obj.getSummaryWriter() and returns: _writer