code: def setup_logging(format="%(asctime)s - %(levelname)s - %(message)s", level='INFO'):
      
      try:
          import coloredlogs
          coloredlogs.install(fmt=format, level=level)
      except ImportError:
          logging.basicConfig(format=format, level=level)
docs: Setup the logging framework with a basic configuration