code: def duplicate(self, template_fact, **modifiers):
          
  
          newfact = template_fact.copy()
          newfact.update(dict(self._get_real_modifiers(**modifiers)))
  
          return self.declare(newfact)
docs: Create a new fact from an existing one.