code: def train_data_idx_marginals(train_data_idx_cpds):
      return create_marginals(
          train_data_idx_cpds,
          {
              "a": list(range(4)),
              "b": list(range(3)),
              "c": list(range(5)),
              "d": list(range(2)),
              "e": list(range(2)),
          },
      )
  
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 10 for calling a global function with example usage: train_data_idx_marginals(train_data_idx_cpds) and returns: create_marginals