code: def fit_catboost_encoders(
      X: np.ndarray, Y: np.ndarray
  ) -> Dict[int, CatBoostEncoder]:
      X = shape_into_2d(X)
  
      catboost_encoders = {}
      for column in range(X.shape[1]):
          if is_categorical(X[:, column]):
              catboost_encoders[column] = CatBoostEncoder()
              catboost_encoders[column].fit(X[:, column], Y)
  
      return catboost_encoders
  
imports: import random
  from typing import Dict, Optional, Union
  import numpy
  from scipy.optimize import minimize
  from sklearn.preprocessing import OneHotEncoder
  from dowhy.gcm.util.catboost_encoder import CatBoostEncoder
label_desc: Use image node_id 7 for calling a global function with example usage: fit_catboost_encoders(X, Y) and returns: catboost_encoders