code: def test_response_variation_filter_raises_exception_duplicate_ids() -> (
      None
  ):
      # Arrange
      utter_action = "utter_greet"
  
      membership_slot = TextSlot(
          name="membership",
          mappings=[{}],
          initial_value="gold",
          influence_conversation=False,
      )
      tracker = DialogueStateTracker.from_events(
          sender_id="duplicate_ids",
          evts=[UserUttered("Hello")],
          slots=[membership_slot],
      )
  
      domain_yaml = textwrap.dedent(
          """
          version: "3.1"
  
          intents:
          - greet
  
          slots:
            membership:
               type: text
               mappings:
               - type: custom
            logged_in:
               type: bool
               influence_conversation: false
               mappings:
               - type: custom
  
          responses:
            utter_greet:
              - text: "How can I help you today?"
                id: "ID_0"
  
              - text: ""
                id: "ID_1"
  
              - text: ""
                id: "ID_1"
          """
      )
  
      domain = Domain.from_yaml(domain_yaml)
      response_variation_filter = ResponseVariationFilter(
          domain.responses
      )
  
      expected_message = (
          "Duplicate response id 'ID_1' defined in the domain."
      )
  
      with pytest.warns(UserWarning, match=expected_message):
          result = response_variation_filter.get_response_variation_id(
              utter_action, tracker, output_channel="app"
          )
  
      assert result is None
  
file_path: rasa/tests/core/nlg/test_generator.py
imports: import textwrap
  from typing import Text
  import pytest
  from rasa.core.nlg.generator import ResponseVariationFilter
  from rasa.shared.core.domain import Domain
  from rasa.shared.core.events import UserUttered
  from rasa.shared.core.slots import TextSlot
  from rasa.shared.core.trackers import DialogueStateTracker
label_desc: Use image node_id 7 for calling a global function with example usage: test_response_variation_filter_raises_exception_duplicate_ids() without return types