<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_by_value(cls, value):
 """ Get constant by its value. :param value: value of the constant to look for :returns: first found constant with given value :raises ValueError: if no constant in container has given value """

        for constant in cls.iterconstants():
            if constant.value == value:
                return constant
        raise ValueError(
            "Constant with value \"{0}\" is not present in \"{1}\""
            .format(value, cls)
        )