code: def _set_categorical_indexes(
      support, cat_support, _fit_params, duplicate=False
  ):
      """Map categorical features in each data repartition"""
  
      if cat_support.any():
          n_features = support.sum()
          support_id = np.zeros_like(support, dtype="int32")
          support_id[support] = np.arange(n_features, dtype="int32")
          cat_feat = support_id[np.where(support & cat_support)[0]]
          # empty if support and cat_support are not alligned
  
          if duplicate:  # is Boruta
              cat_feat = (
                  cat_feat.tolist() + (n_features + cat_feat).tolist()
              )
          else:
              cat_feat = cat_feat.tolist()
  
          _fit_params["categorical_feature"] = cat_feat
  
      return _fit_params
  
file_path: shap-hypetune/shaphypetune/utils.py
imports: import random
  import numpy
  from itertools import product
  from shap import TreeExplainer
label_desc: Use image node_id 5 for calling a global function with example usage: _set_categorical_indexes(support, cat_support, _fit_params, duplicate) and returns: _fit_params