code: def triples(self, source=None, relation=None, target=None):
          
          triplematch = lambda t: (
              (source is None or source == t.source) and
              (relation is None or relation == t.relation) and
              (target is None or target == t.target)
          )
          return list(filter(triplematch, self._triples))
docs: Return triples filtered by their *source*, *relation*, or *target*.