code: def _get_logger():
      global _logger
  
      # Use double-checked locking to avoid taking lock unnecessarily.
      if _logger is not None:
          return _logger
  
      _logger_lock.acquire()
  
      try:
          if _logger:
              return _logger
  
          # Scope the TensorFlow logger to not conflict with users' loggers.
          logger = _logging.getLogger("tensorlayer")
  
          # Don't further configure the TensorFlow logger if the root logger is
          # already configured. This prevents double logging in those cases.
          if not _logging.getLogger().handlers:
              # Determine whether we are in an interactive environment
              # This is only defined in interactive shells.
              if hasattr(_sys, "ps1"):
                  _interactive = True
              else:
                  _interactive = _sys.flags.interactive
  
              # If we are in an interactive environment (like Jupyter), set loglevel
              # to INFO and pipe the output to stdout.
              if _interactive:
                  logger.setLevel(INFO)
                  _logging_target = _sys.stdout
              else:
                  _logging_target = _sys.stderr
  
              # Add the output handler.
              _handler = _logging.StreamHandler(_logging_target)
              _handler.setFormatter(
                  _logging.Formatter("[TL] %(message)s")
              )
              logger.addHandler(_handler)
  
          _logger = logger
          return _logger
  
      finally:
          _logger_lock.release()
  
imports: import logging
  import os
  import sys
  import threading
  import time
  from logging import DEBUG, ERROR, FATAL, INFO, WARN
  import six
  from tensorlayer.decorators import deprecated
label_desc: Use image node_id 1 for calling a global function with example usage: _get_logger() and returns: _logger, _logger, _logger