class_docstr: Mixin class providing convenience methods for column expansion.
docstr: Tabu edges are:
      1. all user defined connections to original feature column
      2. all inter-feature connections (optional)
  
  Args:
      idx_group: The group of indices which correspond to a single
      expanded column.
  
      tabu_edges: The list of tabu_edges to be updated.
  
      tabu_idx_group: Whether inter-group edges should also be considered tabu.
      I.e if a result of a column expansion, often want to prevent edges being learned
      between parameters.
  
  Returns:
      Updated tabu_edges
docstr_tok: ["Tabu","edges","are",":","1.","all","user","defined","connections","to","original","feature","column","2.","all","inter-feature","connections","(","optional",")","Args",":","idx_group",":","The","group","of","indices","which","correspond","to","a","single","expanded","column",".","tabu_edges",":","The","list","of","tabu_edges","to","be","updated",".","tabu_idx_group",":","Whether","inter-group","edges","should","also","be","considered","tabu",".","I.e","if","a","result","of","a","column","expansion",",","often","want","to","prevent","edges","being","learned","between","parameters",".","Returns",":","Updated","tabu_edges"]
code: def update_tabu_edges(
      idx_group: List[int],
      tabu_edges: List[Tuple[int, int]],
      tabu_idx_group: bool,
  ) -> List[Tuple[int, int]]:
      """
      Tabu edges are:
          1. all user defined connections to original feature column
          2. all inter-feature connections (optional)
  
      Args:
          idx_group: The group of indices which correspond to a single
          expanded column.
  
          tabu_edges: The list of tabu_edges to be updated.
  
          tabu_idx_group: Whether inter-group edges should also be considered tabu.
          I.e if a result of a column expansion, often want to prevent edges being learned
          between parameters.
  
      Returns:
          Updated tabu_edges
      """
  
      if tabu_edges is None:
          tabu_edges = []
  
      # copy to prevent mutations
      tabu_edges = deepcopy(tabu_edges)
  
      # handle 1.
      new_tabu_edges = []
      # for each original tabu pair
      for i, j in tabu_edges:
          # idx_group[0] is the original column index
          if i == idx_group[0]:
              new_tabu_edges += [(idx, j) for idx in idx_group[1:]]
          elif j == idx_group[0]:
              new_tabu_edges += [(i, idx) for idx in idx_group[1:]]
      # all new edges added to tabu_edges
      tabu_edges += new_tabu_edges
  
      # handle 2.
      if tabu_idx_group:
          # add on all pairwise permutations of particular feature group
          # NOTE: permutations are needed for edge directionality
          tabu_edges += list(itertools.permutations(idx_group, 2))
  
      return tabu_edges
  
imports: import itertools
  from abc import ABCMeta, abstractmethod
  from copy import deepcopy
  from typing import Dict, List, Tuple
  import numpy
  import torch
  from causalnex.structure.structuremodel import StructureModel
label_desc: Use image node_id 2 for calling the ExpandColumnsMixin obj's underlying member method code with example usage: obj.update_tabu_edges(idx_group, tabu_edges, tabu_idx_group) and returns: tabu_edges