@classmethod
def get(cls, name_or_value):
    """Get the value for a label or vice versa.

        # Arguments
        name_or_value (): label or value to de- or encode

        # Returns
        int value for given string label or vice versa

        # Raises
         TypeError: if argument is neither `int` nor `str`

        """
    if isinstance(name_or_value, int):
        return cls._values[name_or_value]
    if isinstance(name_or_value, str):
        return cls._values.index(name_or_value)
    raise TypeError
