class_docstr: Test behaviour of the learn_dynamic_structure of `from_pandas_dynamic`
class_docstr_tok: ["Test","behaviour","of","the","learn_dynamic_structure","of","`","from_pandas_dynamic","`"]
docstr: If tabu edges do not exist in the original unconstrained network then nothing changes
docstr_tok: ["If","tabu","edges","do","not","exist","in","the","original","unconstrained","network","then","nothing","changes"]
code: def test_tabu_edges_on_non_existing_edges_do_nothing(
      self, data_dynotears_p2
  ):
      """If tabu edges do not exist in the original unconstrained network then nothing changes"""
      df = pd.DataFrame(
          data_dynotears_p2["X"], columns=["a", "b", "c", "d", "e"]
      )
      df.loc[-1, :] = data_dynotears_p2["Y"][0, :5]
      df.loc[-2, :] = data_dynotears_p2["Y"][0, 5:10]
      df = df.sort_index()
  
      sm = from_pandas_dynamic(
          df,
          p=2,
          w_threshold=0.2,
      )
      sm_2 = from_pandas_dynamic(
          df,
          p=2,
          w_threshold=0.2,
          tabu_edges=[
              (0, "a", "a"),
              (0, "a", "b"),
              (0, "a", "c"),
              (0, "a", "d"),
          ],
      )
      assert set(sm_2.edges) == set(sm.edges)
  
imports: import re
  import networkx
  import numpy
  import pandas
  import pytest
  from causalnex.structure.dynotears import from_numpy_dynamic, from_pandas_dynamic
label_desc: Use image node_id 17 for calling the TestFromPandasDynotears obj's underlying member method code with example usage: obj.test_tabu_edges_on_non_existing_edges_do_nothing(data_dynotears_p2) without return types