def METHOD_NAME(self, obj):
    """For the given value, return its corresponding key."""
    for key, val in self.items():
        if val is obj:
            return key
    raise ValueError('The given object could not be found: %r' % obj)