code: def add_logging_handler_once(logger, handler):
      
      class_name = handler.__class__.__name__
      for logger_handler in logger.handlers:
          if logger_handler.__class__.__name__ == class_name:
              return False
  
      logger.addHandler(handler)
      return True
docs: A helper to add a handler to a logger, ensuring there are no duplicates.
  
      :param logger: Logger that should have a handler added.
      :type logger: logging.logger
  
      :param handler: Handler instance to be added. It will not be added if an
          instance of that Handler subclass already exists.
      :type handler: logging.Handler
  
      :returns: True if the logging handler was added, otherwise False.
      :rtype: bool