code: def log_level(level):
      
  
      levels_dict = {0: 50,
                     1: 40,
                     2: 30,
                     3: 20,
                     4: 10}
  
      if not isinstance(level, int):
          level = int(level)
  
      if level > 4:
          level = 4
  
      return levels_dict[level]
docs: This is a function that returns a python like
      level from a HEASOFT like level.