'Returns a list of all frames that contain LUs in which the
``name`` attribute of the LU matchs the given regular expression
``pat``. Note that LU names are composed of "lemma.POS", where
the "lemma" part can be made up of either a single lexeme
(e.g. \'run\') or multiple lexemes (e.g. \'a little\').
Note: if you are going to be doing a lot of this type of
searching, you\'d want to build an index that maps from lemmas to
frames because each time frames_by_lemma() is called, it has to
search through ALL of the frame XML files in the db.
>>> from nltk.corpus import framenet as fn
>>> fn.frames_by_lemma(r\'(?i)a little\') # doctest: +ELLIPSIS
[<frame ID=189 name=Quanti...>, <frame ID=2001 name=Degree>]
:return: A list of frame objects.
:rtype: list(AttrDict)'

def frames_by_lemma(self, pat):

    return PrettyList((f for f in self.frames() if any((re.search(pat, luName) for luName in f.lexUnit))))
