text: """The Level class."""
  import typing
  
  class Level:
      def __init__(
          self,
          name: str,
          value: int,
          color: str="<gray>",
      ) -> None:
  
          self.name: str = name
          """The name of the level."""
  
          self.value: int = value
          """The value of the level."""
  
          self.color: str = color
          """The color of the level."""
  
      def __str__(self) -> str:
          return self.name
  
      def __repr__(self) -> str:
          return f"<Level {self.name} {self.value} {self.color}>"
  
      def __eq__(self, __o: object) -> bool:
          return self.value == __o.value 
      
      def __ne__(self, __o: object) -> bool:
          return self.value != __o.value 
  
      def __gt__(self, __o: object) -> bool:
          return self.value > __o.value
  
      def __lt__(self, __o: object) -> bool:
          return self.value < __o.value
  
      def __ge__(self, __o: object) -> bool:
          return self.value >= __o.value
  
      def __le__(self, __o: object) -> bool:
          return self.value <= __o.value
  
  levels: typing.Tuple[str] = (
      Level("DEBUG", 10, "<gray>"),
      Level("INFO", 20, "<blue>"),
      Level("WARNING", 30, "<yellow>"),
      Level("ERROR", 40, "<red>"),
      Level("CRITICAL", 50, "<red>"),
      Level("FATAL", 60, "<red>"),
  )
  
  levels_by_str: typing.Dict[str, int] = {
      "DEBUG"    : levels[0],
      "INFO"     : levels[1],
      "WARNING"  : levels[2],
      "ERROR"    : levels[3],
      "CRITICAL" : levels[4],
      "FATAL"    : levels[5],
  }
  levels_by_int: typing.Dict[int, str] = {
      10: levels[0],
      20: levels[1],
      30: levels[2],
      40: levels[3],
      50: levels[4],
      60: levels[5],
  }
  
  @typing.overload
  def get_level(level: str) -> typing.Optional["Level"]:
      """This method will return the level of the logging."""
  
  @typing.overload
  def get_level(level: int) -> typing.Optional["Level"]:
      """This method will return the level of the logging."""
  
  def get_level(level: typing.Union[str, int]) -> typing.Optional["Level"]:
      """This method will return the level of the logging."""
      
      if isinstance(level, str):
          return levels_by_str[level]
  
      elif isinstance(level, int):
          return levels_by_int[level]
  
      return level