code: def test_get_categorical_indices(self, mapper, schema):
      cat_indices = mapper.get_categorical_indices()
      cat_features = [x for x in schema.values() if "categorical" in x]
      assert len(cat_indices) == len(cat_features)
  
      cat_cardinality = [
          int(x.split(":")[1])
          for x in schema.values()
          if "categorical" in x
      ]
      assert all(
          len(cat_indices[ix]) == card
          for ix, card in enumerate(cat_cardinality)
      )
  
imports: from collections import OrderedDict
  import pytest
  from causalnex.structure import StructureModel
  from causalnex.structure.categorical_variable_mapper import VariableFeatureMapper, validate_schema
label_desc: Use image node_id 8 for calling the TestVariableFeatureMapper obj's underlying member method code with example usage: obj.test_get_categorical_indices(mapper, schema) without return types