code: def get_type(cls, result_name):
          
          if result_name == "Alarm":
              return cls.ALARM
          elif result_name == "Log Message":
              return cls.LOG
          elif result_name == "Error Message":
              return cls.ERROR
          elif result_name == "Host Detail":
              return cls.HOST_DETAIL
          else:
              assert False, "Erroneous result name {0}.".format(result_name)
docs: Return string name of a result type.