code: def level_from_name(self, level_name):
          
          try:
              return self.LEVELS.index(level_name)
          except ValueError:
              raise ValueError("Unknown logging level name '%s'" % (level_name,))
docs: Return the level constant for a given name.
  
          If the *level_name* is not known, raise a ValueError.
  
          Parameters
          ----------
          level_name : str
              The logging level name whose logging level constant
              to retrieve.
  
          Returns
          -------
          level : logging level constant
              The logging level constant associated with the name.