code: def get_or_add(self, reltype, target_part):
          
          rel = self._get_matching(reltype, target_part)
          if rel is None:
              rId = self._next_rId
              rel = self.add_relationship(reltype, target_part, rId)
          return rel
docs: Return relationship of *reltype* to *target_part*, newly added if not
          already present in collection.