code: def _configure_logger_handler(cls, log_dest, log_filename):
          
  
          if log_dest is None:
              return None
  
          msg_format = '%(asctime)s-%(name)s-%(message)s'
  
          if log_dest == 'stderr':
              # Note: sys.stderr is the default stream for StreamHandler
              handler = logging.StreamHandler()
              handler.setFormatter(logging.Formatter(msg_format))
          elif log_dest == 'file':
              if not log_filename:
                  raise ValueError("Log filename is required if log destination "
                                   "is 'file'")
              handler = logging.FileHandler(log_filename, encoding="UTF-8")
              handler.setFormatter(logging.Formatter(msg_format))
          else:
              raise ValueError(
                  _format("Invalid log destination: {0!A}; Must be one of: "
                          "{1!A}", log_dest, LOG_DESTINATIONS))
  
          return handler
docs: Return a logging handler for the specified `log_dest`, or `None` if
          `log_dest` is `None`.