code: def configure_logging(verbosity):
      
  
      root = logging.getLogger()
  
      formatter = logging.Formatter('%(asctime)s.%(msecs)03d %(levelname).3s %(name)s %(message)s',
                                    '%y-%m-%d %H:%M:%S')
      handler = logging.StreamHandler()
      handler.setFormatter(formatter)
  
      loglevels = [logging.CRITICAL, logging.ERROR, logging.WARNING, logging.INFO, logging.DEBUG]
      if verbosity >= len(loglevels):
          verbosity = len(loglevels) - 1
  
      level = loglevels[verbosity]
  
      root.setLevel(level)
      root.addHandler(handler)
docs: Set up the global logging level.
  
      Args:
          verbosity (int): The logging verbosity