@classmethod
def for_label(cls, value, validate=True):
    """
        Convert the constant into a CSS class that can be used with a <label>.

        Args:
            value: the size.
            validate: check whether the size is one of the predefined
                values. Defaults to True.

        Raises:
            ValueError: if validate is True and the size in invalid.

        Returns:
            str: the CSS class used to set the font size for a label heading.

        """
    if validate and not cls.is_valid(value):
        raise ValueError('Unexpected size', value)
    return 'govuk-label--%s' % value
