code: def test_initialize_potentials(
      self, huang_darwiche_jt, huang_darwiche_dag
  ):
      # Seems like there can be multiple assignments so
      # for this test we will set the assignments explicitely
      cliques = {node.name: node for node in huang_darwiche_jt.nodes}
      bbn_nodes = {node.name: node for node in huang_darwiche_dag.nodes}
      assignments = {
          cliques["Clique_ACE"]: [bbn_nodes["f_c"], bbn_nodes["f_e"]],
          cliques["Clique_ABD"]: [
              bbn_nodes["f_a"],
              bbn_nodes["f_b"],
              bbn_nodes["f_d"],
          ],
      }
      huang_darwiche_jt.initialize_potentials(
          assignments, huang_darwiche_dag
      )
      for node in huang_darwiche_jt.sepset_nodes:
          for v in node.potential_tt.values():
              assert v == 1
  
      # Note that in H&D there are two places that show
      # initial potentials, one is for ABD and AD
      # and the second is for ACE and CE
      # We should test both here but we must enforce
      # the assignments above because alternate and
      # equally correct Junction Trees will give
      # different potentials.
      def r(x):
          return round(x, 3)
  
      tt = cliques["Clique_ACE"].potential_tt
      assert r(tt[("a", True), ("c", True), ("e", True)]) == 0.21
      assert r(tt[("a", True), ("c", True), ("e", False)]) == 0.49
      assert r(tt[("a", True), ("c", False), ("e", True)]) == 0.18
      assert r(tt[("a", True), ("c", False), ("e", False)]) == 0.12
      assert r(tt[("a", False), ("c", True), ("e", True)]) == 0.06
      assert r(tt[("a", False), ("c", True), ("e", False)]) == 0.14
      assert r(tt[("a", False), ("c", False), ("e", True)]) == 0.48
      assert r(tt[("a", False), ("c", False), ("e", False)]) == 0.32
  
      tt = cliques["Clique_ABD"].potential_tt
      assert r(tt[("a", True), ("b", True), ("d", True)]) == 0.225
      assert r(tt[("a", True), ("b", True), ("d", False)]) == 0.025
      assert r(tt[("a", True), ("b", False), ("d", True)]) == 0.125
      assert r(tt[("a", True), ("b", False), ("d", False)]) == 0.125
      assert r(tt[("a", False), ("b", True), ("d", True)]) == 0.180
      assert r(tt[("a", False), ("b", True), ("d", False)]) == 0.020
      assert r(tt[("a", False), ("b", False), ("d", True)]) == 0.150
      assert r(tt[("a", False), ("b", False), ("d", False)]) == 0.150
  
imports: from __future__ import division
  import copy
  from collections import Counter
  import pytest
  from causalnex.ebaybbn import BBNNode, JoinTree, JoinTreeCliqueNode, SepSet, build_bbn, build_bbn_from_conditionals, build_join_tree, combinations, make_moralized_copy, make_node_func, make_undirected_copy, priority_func, triangulate
  from causalnex.ebaybbn.exceptions import VariableNotInGraphError, VariableValueNotInDomainError
  from causalnex.ebaybbn.graph import Node, UndirectedNode
  from causalnex.ebaybbn.utils import get_args, get_original_factors, make_key
label_desc: Use image node_id 9 for calling the TestBBN obj's underlying member method code with example usage: obj.test_initialize_potentials(huang_darwiche_jt, huang_darwiche_dag) and returns: round