code: def train_data_discrete(train_data) -> pd.DataFrame:
      """
      train_data in discretised form. This maps "c" into 5 buckets:
      - 0: x < 20
      - 1: 20 <= x < 40
      - 2: 40 <= x < 60
      - 3: 60 <= x < 80
      - 4: 80 <= x
      """
      df = train_data.copy(deep=True)  # type: pd.DataFrame
      df["c"] = df["c"].apply(
          lambda c: 0
          if c < 20
          else 1
          if c < 40
          else 2
          if c < 60
          else 3
          if c < 80
          else 4
      )
      return df
  
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 4 for calling a global function with example usage: train_data_discrete(train_data) and returns: df