code: def make_logger(rank: int, verbose: bool = True) -> logging.Logger:
      """
      Return a logger for writing to stdout
      Args:
          rank (int): rank of node making logger
          verbose (bool): whether to set log-level to INFO; o.w. WARNING
      Returns:
          Python logger
      """
      logger = logging.getLogger(__name__)
      if logger not in HANDLER_AND_LEVEL_SET:
          # if not getattr(logger, "handler_and_level_set", None):
          console = logging.StreamHandler(stream=sys.stdout)
          format_str = "{}".format(rank)
          format_str += (
              ": %(levelname)s -- %(threadName)s -- %(message)s"
          )
          console.setFormatter(logging.Formatter(format_str))
          logger.addHandler(console)  # prints to console
          if verbose:
              logger.setLevel(logging.DEBUG)
          else:
              logger.setLevel(logging.INFO)
          HANDLER_AND_LEVEL_SET.add(logger)
          # logger.handler_and_level_set = True
      return logger
  
file_path: fairscale/fairscale/experimental/nn/data_parallel/gossip/utils/helpers.py
imports: import collections
  import logging
  import sys
  from typing import Any, Dict, List, MutableMapping, Set, Tuple
  import torch
  import torch.distributed
label_desc: Use image node_id 5 for calling a global function with example usage: make_logger(rank, verbose) and returns: logger