code: def test_rasa_x_raises_warning_and_exits_without_production_flag():
      args = argparse.Namespace(
          loglevel=None, log_file=None, production=None
      )
      with pytest.raises(SystemExit):
          with pytest.warns(
              UserWarning,
              match="Running Rasa X in local mode is no longer supported as Rasa has "
              "stopped supporting the Community Edition (free version) of ‘Rasa X’. "
              "For more information please see "
              "https://rasa.com/blog/rasa-x-community-edition-changes/",
          ):
              x.rasa_x(args)
  
imports: from pathlib import Path
  import sys
  import argparse
  import pytest
  from typing import Callable
  from _pytest.monkeypatch import MonkeyPatch
  from _pytest.pytester import RunResult
  from aioresponses import aioresponses
  import rasa.shared.utils.io
  from rasa.cli import x
  from rasa.utils.endpoints import EndpointConfig
  from rasa.core.utils import AvailableEndpoints
  import rasa.version
  from tests.cli.conftest import RASA_EXE
label_desc: Use image node_id 5 for calling a global function with example usage: test_rasa_x_raises_warning_and_exits_without_production_flag() without return types