code: def _build_matcher(matches, flags):
          
          if matches:
              if callable(matches):
                  return matches
              return lambda obj: re.search(matches, str(obj), flags)
          return lambda obj: True
docs: Helper for :meth:`_indexed_ifilter` and others.
  
          If *matches* is a function, return it. If it's a regex, return a
          wrapper around it that can be called with a node to do a search. If
          it's ``None``, return a function that always returns ``True``.