docs: def value_name(cls, value):
          """
          Returns the label from a value if label exists otherwise returns the value
          since method does a reverse look up it is slow
          """
          for k, v in list(cls.__dict__.items()):
              if v == value:
                  return k
          return value