code: def test_entity_synonyms(
      default_model_storage: ModelStorage,
      default_execution_context: ExecutionContext,
  ):
      resource = Resource("xy")
      entities = [
          {"entity": "test", "value": "chines", "start": 0, "end": 6},
          {"entity": "test", "value": "chinese", "start": 0, "end": 6},
          {"entity": "test", "value": "china", "start": 0, "end": 6},
      ]
      ent_synonyms = {"chines": "chinese", "NYC": "New York City"}
  
      mapper = EntitySynonymMapper.create(
          {},
          default_model_storage,
          resource,
          default_execution_context,
          ent_synonyms,
      )
      mapper.replace_synonyms(entities)
  
      assert len(entities) == 3
      assert entities[0]["value"] == "chinese"
      assert entities[1]["value"] == "chinese"
      assert entities[2]["value"] == "china"
  
file_path: rasa/tests/nlu/extractors/test_entity_synonyms.py
imports: from rasa.nlu.extractors.entity_synonyms import EntitySynonymMapper
  from rasa.shared.nlu.constants import TEXT, ENTITIES
  from rasa.shared.nlu.training_data.training_data import TrainingData
  from rasa.shared.nlu.training_data.message import Message
  from rasa.engine.storage.storage import ModelStorage
  from rasa.engine.graph import ExecutionContext
  from rasa.engine.storage.resource import Resource
label_desc: Use image node_id 1 for calling a global function with example usage: test_entity_synonyms(default_model_storage, default_execution_context) without return types