code: function(mapping, notYetSubstitutedFact, causedBy, graphs) {
          var subject, predicate, object, substitutedFact;
          if (mapping == {}) {
              return notYetSubstitutedFact;
          }
          subject = this.substituteElementVariablesWithMapping(notYetSubstitutedFact.subject, mapping);
          predicate = this.substituteElementVariablesWithMapping(notYetSubstitutedFact.predicate, mapping);
          object = this.substituteElementVariablesWithMapping(notYetSubstitutedFact.object, mapping);        
  
          substitutedFact = new Fact(predicate, subject, object, [], false);
  
          if (causedBy) {
              substitutedFact.causedBy = causedBy;
              substitutedFact.explicit = false;
          }
  
          if (graphs) {
              substitutedFact.graphs = graphs;
          }
  
          return substitutedFact;
      }
docs: Substitutes fact's variable members (sub, pred, obj)
  given the mapping.
  @param mapping
  @param notYetSubstitutedFact
  @param causedBy
  @param graphs
  @returns {*}