code: def test_process_does_not_overwrite_any_entities(
      create_or_load_extractor: Callable[..., RegexEntityExtractor]
  ):
      pre_existing_entity = {
          ENTITY_ATTRIBUTE_TYPE: "person",
          ENTITY_ATTRIBUTE_VALUE: "Max",
          ENTITY_ATTRIBUTE_START: 0,
          ENTITY_ATTRIBUTE_END: 3,
          EXTRACTOR: "other extractor",
      }
      message = Message(
          data={TEXT: "Max lives in Berlin.", INTENT: "infrom"}
      )
      message.set(ENTITIES, [copy.deepcopy(pre_existing_entity)])
  
      training_data = TrainingData()
      training_data.training_examples = [
          Message(
              data={
                  TEXT: "Hi Max!",
                  INTENT: "greet",
                  ENTITIES: [
                      {
                          ENTITY_ATTRIBUTE_TYPE: "person",
                          ENTITY_ATTRIBUTE_VALUE: "Max",
                      }
                  ],
              }
          ),
          Message(
              data={
                  TEXT: "I live in Berlin",
                  INTENT: "inform",
                  ENTITIES: [
                      {
                          ENTITY_ATTRIBUTE_TYPE: "city",
                          ENTITY_ATTRIBUTE_VALUE: "Berlin",
                      }
                  ],
              }
          ),
      ]
      training_data.lookup_tables = [
          {
              "name": "city",
              "elements": ["London", "Berlin", "Amsterdam"],
          }
      ]
  
      entity_extractor = create_or_load_extractor(config={})
      entity_extractor.train(training_data)
      entity_extractor.process([message])
  
      entities = message.get(ENTITIES)
      assert entities == [
          pre_existing_entity,
          {
              ENTITY_ATTRIBUTE_TYPE: "city",
              ENTITY_ATTRIBUTE_VALUE: "Berlin",
              ENTITY_ATTRIBUTE_START: 13,
              ENTITY_ATTRIBUTE_END: 19,
              EXTRACTOR: RegexEntityExtractor.__name__,
          },
      ]
  
file_path: rasa/tests/nlu/extractors/test_regex_entity_extractor.py
imports: import copy
  from rasa.engine.graph import ExecutionContext
  from rasa.engine.storage.storage import ModelStorage
  from typing import Any, Text, Dict, List, Callable
  import pytest
  from rasa.engine.storage.resource import Resource
  from rasa.shared.nlu.training_data.training_data import TrainingData
  from rasa.shared.nlu.training_data.message import Message
  from rasa.shared.nlu.constants import ENTITIES, ENTITY_ATTRIBUTE_TYPE, ENTITY_ATTRIBUTE_VALUE, ENTITY_ATTRIBUTE_START, ENTITY_ATTRIBUTE_END, TEXT, INTENT, EXTRACTOR
  from rasa.nlu.extractors.regex_entity_extractor import RegexEntityExtractor
label_desc: Use image node_id 4 for calling a global function with example usage: test_process_does_not_overwrite_any_entities(create_or_load_extractor) without return types