code: def test_comparator_combiner_entities(
      entity_1: List[str], entity_2: List[str], expected: bool
  ):
      config = {
          "input_features": [
              {"name": "a1", "type": "category"},
              {"name": "b1", "type": "category"},
              {"name": "b2", "type": "category"},
          ],
          "output_features": [
              {"name": "out1", "type": "binary"},
          ],
          "combiner": {
              "type": "comparator",
              "entity_1": entity_1,
              "entity_2": entity_2,
          },
      }
  
      with pytest.raises(
          ConfigValidationError
      ) if not expected else contextlib.nullcontext():
          config_obj = ModelConfig.from_dict(config)
          assert config_obj.combiner.entity_1 == ["a1"]
          assert config_obj.combiner.entity_2 == ["b1", "b2"]
  
imports: import contextlib
  from typing import Any, Dict, List, Optional
  import pytest
  import yaml
  from ludwig.constants import COMBINER, TYPE
  from ludwig.error import ConfigValidationError
  from ludwig.schema.model_types.base import ModelConfig
  from tests.integration_tests.utils import binary_feature, text_feature
label_desc: Use image node_id 9 for calling a global function with example usage: test_comparator_combiner_entities(entity_1, entity_2, expected) without return types