@classmethod
def tostring(cls, val):
    """Transforms val into string."""
    from Gaugi.utilities import get_attributes
    for k, v in get_attributes(cls, getProtected=False):
        if v == val:
            return k
    return None
