class_docstr: A Directed Acyclic Graph
class_docstr_tok: ["A","Directed","Acyclic","Graph"]
code: def __init__(self, nodes_dict, name=None, domains={}):
      self.nodes = list(nodes_dict.values())
      self.vars_to_nodes = nodes_dict
      self.domains = domains
      # For each node we want
      # to explicitly record which
      # variable it 'introduced'.
      # Note that we cannot record
      # this duing Node instantiation
      # becuase at that point we do
      # not yet know *which* of the
      # variables in the argument
      # list is the one being modeled
      # by the function. (Unless there
      # is only one argument)
      for variable_name, node in list(nodes_dict.items()):
          node.variable_name = variable_name
  
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 1 to create a new BBN object  with example: obj = BBN(nodes_dict, name, domains)