@classmethod<EOL><INDENT>def _validate_label(cls, name, value):<DEDENT>
<EOL>cls._check_label_name(name)<EOL>cls._check_label_value(value)<EOL>if not cls._allow_reserved_keys and name in RESERVED_LABELS:<EOL><INDENT>raise ValueError('<STR_LIT>' %<EOL>(name, list(RESERVED_LABELS)))<EOL><DEDENT>
Raise ValueError if the label is invalid.