def tags_from_hit(self, tag_ids):
        """
        :param tag_ids: indexed ids of tags in hit result.
            Do not pass hit instances.

        :returns: an iterable of :class:`Tag` instances.
        """
        ids = []
        for t in tag_ids.split():
            t = t.strip()
            try:
                t = int(t)
            except ValueError:
                pass
            else:
                ids.append(t)

        if not ids:
            return []

        return Tag.query.filter(Tag.id.in_(ids)).all()
def tags_from_hit ( self , tag_ids ) : ids = [ ] for t in tag_ids . split ( ) : t = t . strip ( ) try : t = int ( t ) except ValueError : pass else : ids . append ( t ) if not ids : return [ ] return Tag . query . filter ( Tag . id . in_ ( ids ) ) . all ( )
:param tag_ids: indexed ids of tags in hit result.
            Do not pass hit instances.

        :returns: an iterable of :class:`Tag` instances.