code: def _discretize_feature(
      feature: np.ndarray, category_map: List[Tuple[float, str]]
  ):
      """Map continous features onto discrete categories.
      - All feature values must be positive.
      - First lower bound must be zero.
      - Lower bounds must be strictly ascending.
      """
      cat_feat = np.zeros(feature.shape[0]).astype(str)
      for lower_bound, category in category_map:
          cat_feat[feature >= lower_bound] = category
      return cat_feat
  
file_path: responsible-ai-toolbox/responsibleai/tests/causal/conftest.py
imports: import copy
  from typing import List, Tuple
  import numpy
  import pandas
  import pytest
  import shap
  from sklearn.model_selection import train_test_split
  from tests.common_utils import create_adult_income_dataset
  from rai_test_utils.datasets.tabular import create_housing_data
label_desc: Use image node_id 3 for calling a global function with example usage: _discretize_feature(feature, category_map) and returns: cat_feat