code: def data_dynotears_p2() -> Dict[str, np.ndarray]:
      """
      Training data for testing Dynamic Bayesian Networks. Return a time series with 50 time points, with 5 columns
      This data was simulated with te following configurations
      Configurations:
          - data points 50,
          - num. variables: 5,
          - p (lag amount): 2,
          - graph type (intra-slice graph): 'erdos-renyi',
          - graph type (inter-slice graph): 'erdos-renyi',
          - SEM type: 'linear-gauss',
          - weight range, intra-slice graph: (0.5, 2.0),
          - weight range, inter-slice graph: (0.3, 0.5),
          - expected degree, inter-slice graph: 3,
          - noise scale (gaussian noise): 1.0,
          - w decay: 1.1
      Returns:
          dictionary with keys W (intra-weights) ,A (inter-weights), X and Y (inputs of from_numpy_dynamic)
      """
      data = {
          "W": np.array(
              [
                  [0.0, 0.0, 0.0, 0.0, -1.08],
                  [1.16, 0.0, 0.0, -0.81, 0.89],
                  [-1.83, 0.58, 0.0, 0.61, -1.31],
                  [1.03, 0.0, 0.0, 0.0, -0.97],
                  [0.0, 0.0, 0.0, 0.0, 0.0],
              ]
          ),
          "A": np.array(
              [
                  [0.31, 0.0, 0.0, 0.32, 0.0],
                  [0.0, 0.36, 0.0, 0.0, 0.5],
                  [-0.43, 0.0, 0.0, -0.49, -0.39],
                  [0.39, 0.0, 0.39, 0.0, 0.38],
                  [0.0, 0.37, 0.0, 0.43, 0.0],
                  [0.0, -0.37, 0.34, 0.0, 0.0],
                  [-0.3, 0.0, -0.42, 0.0, 0.45],
                  [0.0, -0.34, 0.0, 0.0, 0.0],
                  [0.0, 0.31, 0.0, 0.29, 0.36],
                  [-0.43, 0.37, 0.0, 0.0, -0.34],
              ]
          ),
          "X": np.array(
              [
                  [3.1, 0.9, 1.6, 2.9, -6.5],
                  [-5.6, -4.1, 3.9, 4.7, -3.4],
                  [-6.3, -3.5, 2.2, 1.4, 0.4],
                  [-0.3, 0.2, -0.5, -1.5, 2.0],
                  [2.4, 1.6, -0.9, -0.7, -0.9],
                  [0.6, -0.1, 0.2, 1.5, -2.7],
                  [-2.4, -1.6, 2.2, 1.3, -1.6],
                  [-4.6, 0.5, 1.4, -2.6, 6.9],
                  [-1.3, -0.1, -1.3, -1.7, 3.7],
                  [0.5, 4.7, -2.0, -4.1, 6.8],
                  [8.8, 4.9, -2.7, -1.1, -0.3],
                  [3.8, 3.1, -0.4, 0.1, 1.5],
                  [2.0, -0.9, 0.1, 3.9, -1.6],
                  [-3.8, -0.9, 2.7, 1.3, 2.4],
                  [-4.4, 3.2, 2.1, -3.3, 9.9],
                  [0.2, 4.8, -1.6, -3.7, 9.7],
                  [5.1, 2.8, -6.4, -1.5, 3.7],
                  [8.1, 4.3, -2.4, -0.1, -1.6],
                  [2.1, 0.9, 1.5, 2.9, -4.1],
                  [-4.1, -3.9, 0.2, 1.1, 4.1],
                  [0.3, -3.0, 0.2, 3.0, -4.7],
                  [-1.2, 2.8, 2.7, -0.9, -0.9],
                  [-0.8, 1.8, 1.7, -0.7, 2.4],
                  [-0.2, -2.2, -1.8, 2.6, -0.3],
                  [-0.9, 2.1, 0.8, -2.3, 5.9],
                  [1.5, 3.6, 0.4, -0.1, -0.1],
                  [-3.0, 1.3, -1.6, -3.2, 9.5],
                  [6.8, -0.1, -3.5, 2.5, -3.2],
                  [3.5, 1.8, -1.7, -2.1, 0.5],
                  [5.1, 1.0, 1.6, 3.6, -6.5],
                  [-2.8, -3.0, 1.4, 1.8, -3.5],
                  [-5.9, -4.8, 3.2, 4.0, -3.6],
                  [-6.7, -2.2, 1.3, -2.7, 4.8],
                  [0.4, 0.0, -1.8, -0.9, 0.4],
                  [3.2, 1.7, -2.9, -3.6, 3.1],
                  [5.7, 0.9, -2.9, -0.3, -1.4],
                  [3.4, -2.0, -0.5, 3.5, -9.1],
                  [-4.3, -4.4, 2.9, 2.6, -5.2],
                  [-9.7, -6.4, 3.4, 1.9, -1.4],
                  [-5.2, -1.4, 1.6, -2.3, 1.0],
                  [-1.1, 1.1, -1.6, -3.5, 4.1],
                  [0.9, 2.0, -1.6, -2.6, 3.3],
                  [4.3, 4.8, -0.7, -0.7, 0.3],
                  [4.9, -0.4, -1.3, 1.8, -3.9],
                  [1.3, -2.9, -0.8, 2.0, -1.3],
                  [-0.1, -0.8, 2.9, 3.1, -6.7],
                  [-5.8, 0.5, 4.0, -1.2, 2.6],
                  [-1.8, -2.4, -2.0, -2.4, 3.5],
                  [3.3, 0.7, -3.0, -0.6, 0.0],
                  [4.5, -0.1, 0.4, 2.9, -10.8],
              ]
          ),
          "Y": np.array(
              [
                  [
                      6.1,
                      0.5,
                      -2.0,
                      0.9,
                      -3.0,
                      2.9,
                      1.5,
                      -0.9,
                      -0.2,
                      0.8,
                  ],
                  [3.1, 0.9, 1.6, 2.9, -6.5, 6.1, 0.5, -2.0, 0.9, -3.0],
                  [
                      -5.6,
                      -4.1,
                      3.9,
                      4.7,
                      -3.4,
                      3.1,
                      0.9,
                      1.6,
                      2.9,
                      -6.5,
                  ],
                  [
                      -6.3,
                      -3.5,
                      2.2,
                      1.4,
                      0.4,
                      -5.6,
                      -4.1,
                      3.9,
                      4.7,
                      -3.4,
                  ],
                  [
                      -0.3,
                      0.2,
                      -0.5,
                      -1.5,
                      2.0,
                      -6.3,
                      -3.5,
                      2.2,
                      1.4,
                      0.4,
                  ],
                  [
                      2.4,
                      1.6,
                      -0.9,
                      -0.7,
                      -0.9,
                      -0.3,
                      0.2,
                      -0.5,
                      -1.5,
                      2.0,
                  ],
                  [
                      0.6,
                      -0.1,
                      0.2,
                      1.5,
                      -2.7,
                      2.4,
                      1.6,
                      -0.9,
                      -0.7,
                      -0.9,
                  ],
                  [
                      -2.4,
                      -1.6,
                      2.2,
                      1.3,
                      -1.6,
                      0.6,
                      -0.1,
                      0.2,
                      1.5,
                      -2.7,
                  ],
                  [
                      -4.6,
                      0.5,
                      1.4,
                      -2.6,
                      6.9,
                      -2.4,
                      -1.6,
                      2.2,
                      1.3,
                      -1.6,
                  ],
                  [
                      -1.3,
                      -0.1,
                      -1.3,
                      -1.7,
                      3.7,
                      -4.6,
                      0.5,
                      1.4,
                      -2.6,
                      6.9,
                  ],
                  [
                      0.5,
                      4.7,
                      -2.0,
                      -4.1,
                      6.8,
                      -1.3,
                      -0.1,
                      -1.3,
                      -1.7,
                      3.7,
                  ],
                  [
                      8.8,
                      4.9,
                      -2.7,
                      -1.1,
                      -0.3,
                      0.5,
                      4.7,
                      -2.0,
                      -4.1,
                      6.8,
                  ],
                  [
                      3.8,
                      3.1,
                      -0.4,
                      0.1,
                      1.5,
                      8.8,
                      4.9,
                      -2.7,
                      -1.1,
                      -0.3,
                  ],
                  [2.0, -0.9, 0.1, 3.9, -1.6, 3.8, 3.1, -0.4, 0.1, 1.5],
                  [
                      -3.8,
                      -0.9,
                      2.7,
                      1.3,
                      2.4,
                      2.0,
                      -0.9,
                      0.1,
                      3.9,
                      -1.6,
                  ],
                  [
                      -4.4,
                      3.2,
                      2.1,
                      -3.3,
                      9.9,
                      -3.8,
                      -0.9,
                      2.7,
                      1.3,
                      2.4,
                  ],
                  [
                      0.2,
                      4.8,
                      -1.6,
                      -3.7,
                      9.7,
                      -4.4,
                      3.2,
                      2.1,
                      -3.3,
                      9.9,
                  ],
                  [
                      5.1,
                      2.8,
                      -6.4,
                      -1.5,
                      3.7,
                      0.2,
                      4.8,
                      -1.6,
                      -3.7,
                      9.7,
                  ],
                  [
                      8.1,
                      4.3,
                      -2.4,
                      -0.1,
                      -1.6,
                      5.1,
                      2.8,
                      -6.4,
                      -1.5,
                      3.7,
                  ],
                  [
                      2.1,
                      0.9,
                      1.5,
                      2.9,
                      -4.1,
                      8.1,
                      4.3,
                      -2.4,
                      -0.1,
                      -1.6,
                  ],
                  [-4.1, -3.9, 0.2, 1.1, 4.1, 2.1, 0.9, 1.5, 2.9, -4.1],
                  [
                      0.3,
                      -3.0,
                      0.2,
                      3.0,
                      -4.7,
                      -4.1,
                      -3.9,
                      0.2,
                      1.1,
                      4.1,
                  ],
                  [
                      -1.2,
                      2.8,
                      2.7,
                      -0.9,
                      -0.9,
                      0.3,
                      -3.0,
                      0.2,
                      3.0,
                      -4.7,
                  ],
                  [
                      -0.8,
                      1.8,
                      1.7,
                      -0.7,
                      2.4,
                      -1.2,
                      2.8,
                      2.7,
                      -0.9,
                      -0.9,
                  ],
                  [
                      -0.2,
                      -2.2,
                      -1.8,
                      2.6,
                      -0.3,
                      -0.8,
                      1.8,
                      1.7,
                      -0.7,
                      2.4,
                  ],
                  [
                      -0.9,
                      2.1,
                      0.8,
                      -2.3,
                      5.9,
                      -0.2,
                      -2.2,
                      -1.8,
                      2.6,
                      -0.3,
                  ],
                  [
                      1.5,
                      3.6,
                      0.4,
                      -0.1,
                      -0.1,
                      -0.9,
                      2.1,
                      0.8,
                      -2.3,
                      5.9,
                  ],
                  [
                      -3.0,
                      1.3,
                      -1.6,
                      -3.2,
                      9.5,
                      1.5,
                      3.6,
                      0.4,
                      -0.1,
                      -0.1,
                  ],
                  [
                      6.8,
                      -0.1,
                      -3.5,
                      2.5,
                      -3.2,
                      -3.0,
                      1.3,
                      -1.6,
                      -3.2,
                      9.5,
                  ],
                  [
                      3.5,
                      1.8,
                      -1.7,
                      -2.1,
                      0.5,
                      6.8,
                      -0.1,
                      -3.5,
                      2.5,
                      -3.2,
                  ],
                  [5.1, 1.0, 1.6, 3.6, -6.5, 3.5, 1.8, -1.7, -2.1, 0.5],
                  [
                      -2.8,
                      -3.0,
                      1.4,
                      1.8,
                      -3.5,
                      5.1,
                      1.0,
                      1.6,
                      3.6,
                      -6.5,
                  ],
                  [
                      -5.9,
                      -4.8,
                      3.2,
                      4.0,
                      -3.6,
                      -2.8,
                      -3.0,
                      1.4,
                      1.8,
                      -3.5,
                  ],
                  [
                      -6.7,
                      -2.2,
                      1.3,
                      -2.7,
                      4.8,
                      -5.9,
                      -4.8,
                      3.2,
                      4.0,
                      -3.6,
                  ],
                  [
                      0.4,
                      0.0,
                      -1.8,
                      -0.9,
                      0.4,
                      -6.7,
                      -2.2,
                      1.3,
                      -2.7,
                      4.8,
                  ],
                  [
                      3.2,
                      1.7,
                      -2.9,
                      -3.6,
                      3.1,
                      0.4,
                      0.0,
                      -1.8,
                      -0.9,
                      0.4,
                  ],
                  [
                      5.7,
                      0.9,
                      -2.9,
                      -0.3,
                      -1.4,
                      3.2,
                      1.7,
                      -2.9,
                      -3.6,
                      3.1,
                  ],
                  [
                      3.4,
                      -2.0,
                      -0.5,
                      3.5,
                      -9.1,
                      5.7,
                      0.9,
                      -2.9,
                      -0.3,
                      -1.4,
                  ],
                  [
                      -4.3,
                      -4.4,
                      2.9,
                      2.6,
                      -5.2,
                      3.4,
                      -2.0,
                      -0.5,
                      3.5,
                      -9.1,
                  ],
                  [
                      -9.7,
                      -6.4,
                      3.4,
                      1.9,
                      -1.4,
                      -4.3,
                      -4.4,
                      2.9,
                      2.6,
                      -5.2,
                  ],
                  [
                      -5.2,
                      -1.4,
                      1.6,
                      -2.3,
                      1.0,
                      -9.7,
                      -6.4,
                      3.4,
                      1.9,
                      -1.4,
                  ],
                  [
                      -1.1,
                      1.1,
                      -1.6,
                      -3.5,
                      4.1,
                      -5.2,
                      -1.4,
                      1.6,
                      -2.3,
                      1.0,
                  ],
                  [
                      0.9,
                      2.0,
                      -1.6,
                      -2.6,
                      3.3,
                      -1.1,
                      1.1,
                      -1.6,
                      -3.5,
                      4.1,
                  ],
                  [
                      4.3,
                      4.8,
                      -0.7,
                      -0.7,
                      0.3,
                      0.9,
                      2.0,
                      -1.6,
                      -2.6,
                      3.3,
                  ],
                  [
                      4.9,
                      -0.4,
                      -1.3,
                      1.8,
                      -3.9,
                      4.3,
                      4.8,
                      -0.7,
                      -0.7,
                      0.3,
                  ],
                  [
                      1.3,
                      -2.9,
                      -0.8,
                      2.0,
                      -1.3,
                      4.9,
                      -0.4,
                      -1.3,
                      1.8,
                      -3.9,
                  ],
                  [
                      -0.1,
                      -0.8,
                      2.9,
                      3.1,
                      -6.7,
                      1.3,
                      -2.9,
                      -0.8,
                      2.0,
                      -1.3,
                  ],
                  [
                      -5.8,
                      0.5,
                      4.0,
                      -1.2,
                      2.6,
                      -0.1,
                      -0.8,
                      2.9,
                      3.1,
                      -6.7,
                  ],
                  [
                      -1.8,
                      -2.4,
                      -2.0,
                      -2.4,
                      3.5,
                      -5.8,
                      0.5,
                      4.0,
                      -1.2,
                      2.6,
                  ],
                  [
                      3.3,
                      0.7,
                      -3.0,
                      -0.6,
                      0.0,
                      -1.8,
                      -2.4,
                      -2.0,
                      -2.4,
                      3.5,
                  ],
              ]
          ),
      }
      return data
  
imports: import itertools
  from typing import Dict
  import numpy
  import pandas
  import pytest
  from pgmpy.models import BayesianNetwork
  from sklearn.datasets import load_iris
  from causalnex.discretiser import Discretiser
  from causalnex.network import BayesianNetwork
  from causalnex.structure import StructureModel
  from causalnex.structure.notears import from_pandas
label_desc: Use image node_id 22 for calling a global function with example usage: data_dynotears_p2() and returns: data