code: def discrete_to_integer(discrete):
      encoder = LabelEncoder()
      discrete = encoder.fit_transform(discrete)
      return discrete, encoder
  
file_path: dowhy/dowhy/utils/propensity_score.py
imports: import numpy
  import pandas
  from pandas import get_dummies
  from sklearn.linear_model import LogisticRegression
  from sklearn.preprocessing import LabelEncoder
  from statsmodels.nonparametric.kernel_density import EstimatorSettings, KDEMultivariateConditional
label_desc: Use image node_id 8 for calling a global function with example usage: discrete_to_integer(discrete) and returns: discrete,  encoder