code: def build_beta_part(ruleset, alpha_terminals):
          
          for rule in ruleset:
              if isinstance(rule[0], OR):
                  for subrule in rule[0]:
                      wire_rule(rule, alpha_terminals, lhs=subrule)
              else:
                  wire_rule(rule, alpha_terminals, lhs=rule)
docs: Given a set of already adapted rules, and a dictionary of
          patterns and alpha_nodes, wire up the beta part of the RETE
          network.