code: def chain_network() -> BayesianNetwork:
      """
      This Bayesian Model structure to test do interventions that split graph
      into subgraphs.
  
      a → b → c → d → e
      """
      n = 50
      nodes_names = list("abcde")
      random_binary_matrix = (
          np.random.randint(10, size=(n, len(nodes_names))) > 6
      ).astype(int)
      df = pd.DataFrame(data=random_binary_matrix, columns=nodes_names)
  
      model = StructureModel()
      model.add_edges_from(
          [
              ("a", "b"),
              ("b", "c"),
              ("c", "d"),
              ("d", "e"),
          ]
      )
      chain_bn = BayesianNetwork(model)
      chain_bn = chain_bn.fit_node_states(df)
      chain_bn = chain_bn.fit_cpds(
          df, method="BayesianEstimator", bayes_prior="K2"
      )
      return chain_bn
  
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 27 for calling a global function with example usage: chain_network() and returns: chain_bn