def expand_entity(self, entity):
        """
        Search and return entity or sub entity that contain value of this field.
        :param entity:
        :return: entity
        :raise KeyError
        """
        if self.name in entity:
            return entity
        for key, value in entity.items():
            if isinstance(value, dict):
                if self.name in value:
                    return value
        raise KeyError("The field %s (%s) not found in %s" % (self.name, self._rule['type'], entity))