'Looks up the name of a particular value.'

def lookup_name(self, const_val):

    for (k, v) in self.__dict__.iteritems():
        if (v == const_val):
            return k
    raise AttributeError(('Value    %s    not    found    in    enum' % const_val))
