code: def declare(self, fact):
          
  
          if not isinstance(fact, Fact):
              raise ValueError('The fact must descend the Fact class.')
  
          # Validate fact, will raise on validation error.
          fact.validate()
  
          fact_id = self._get_fact_id(fact)
  
          if self.duplication or fact_id not in self.reference_counter:
              # Assign the ID to the fact
              idx = self.last_index
              fact.__factid__ = idx
  
              # Insert the fact in the factlist
              self[idx] = fact
  
              self.last_index += 1
  
              self.added.append(fact)
              self.reference_counter[fact_id] += 1
  
              watchers.FACTS.info(" ==> %s: %r", fact, fact)
              return fact
          else:
              return None
docs: Assert (in clips terminology) a fact.
  
          This keeps insertion order.
  
          .. warning:: This will reject any object that not descend
                       from the Fact class.
  
          :param fact: The fact to declare, **must** be derived from
                       :obj:`pyknow.fact.Fact`.
          :return: (int) The index of the fact in the list.
          :throws ValueError: If the fact providen is not a Fact object