code: def get_modernrpc_logger(name):
      
      logger = logging.getLogger(name)
      if not logger_has_handlers(logger):
          # If logging is not configured in the current project, configure this logger to discard all logs messages.
          # This will prevent the 'No handlers could be found for logger XXX' error on Python 2,
          # and avoid redirecting errors to the default 'lastResort' StreamHandler on Python 3
          logger.addHandler(logging.NullHandler())
      return logger
docs: Get a logger from default logging manager. If no handler is associated, add a default NullHandler