code: def collect(tp, *args):
      
  
      def decorator(f):
          add_triple_pattern(tp, f, args)
  
      return decorator
docs: Decorator to attach a collector function to a triple pattern
      :param tp:
      :param args:
      :return: