def METHOD_NAME():
  """Return logger instance."""
  global _logger
  # Use double-checked locking to avoid taking lock unnecessarily.
  if _logger:
    return _logger
  _logger_lock.acquire()
  try:
    if _logger:
      return _logger
    # Scope the TensorFlow logger to not conflict with users' loggers.
    logger = _logging.getLogger('nndct')
    logger.setLevel(1)
    # Override findCaller on the logger to skip internal helper functions
    logger.findCaller = _logger_find_caller
    # 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
      _interactive = False
      try:
        # This is only defined in interactive shells.
        if _sys.ps1:
          _interactive = True
      except AttributeError:
        # Even now, we may be in an interactive shell with `python -i`.
        _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(_logging_fmt, None))
      logger.addHandler(_handler)
    _logger = logger
    return _logger
  finally:
    _logger_lock.release()