docstr: See page 20 of PPTC.
  We assign a new potential tt to
  the sepset which consists of the
  potential of the source node
  with all variables not in R marginalized.
docstr_tok: ["See","page","20","of","PPTC",".","We","assign","a","new","potential","tt","to","the","sepset","which","consists","of","the","potential","of","the","source","node","with","all","variables","not","in","R","marginalized","."]
code: def project(self, sepset_node):
      """See page 20 of PPTC.
      We assign a new potential tt to
      the sepset which consists of the
      potential of the source node
      with all variables not in R marginalized.
      """
      assert sepset_node in self.neighbours
      # First we make a copy of the
      # old potential tt
  
      # Now we assign a new potential tt
      # to the sepset by marginalizing
      # out the variables from X that are not
      # in the sepset
      # ToDO test and check this function
      # Todo check on the old sepset potentials and when they will be set
  
      sepset_node.potential_tt_old = copy.deepcopy(
          sepset_node.potential_tt
      )
      tt = defaultdict(float)
      for k, v in self.potential_tt.items():
          entry = transform(
              k, self.variable_names, sepset_node.variable_names
          )
          tt[entry] += v
      sepset_node.potential_tt = tt
  
imports: import copy
  import heapq
  import logging
  from collections import defaultdict
  from io import StringIO
  from itertools import combinations, product
  from random import choice, random
  from .exceptions import VariableNotInGraphError, VariableValueNotInDomainError
  from .graph import Node, UndirectedGraph, UndirectedNode, connect
  from .utils import get_args, get_original_factors
label_desc: Use image node_id 5 for calling the JoinTreeCliqueNode obj's underlying member method code with example usage: obj.project(sepset_node) without return types