code: def _rasa_service(
      args: argparse.Namespace,
      endpoints: AvailableEndpoints,
      rasa_x_url: Optional[Text] = None,
      credentials_path: Optional[Text] = None,
  ) -> None:
      """Starts the Rasa application."""
      from rasa.core.run import serve_application
  
      # needs separate logging configuration as it is started in its own process
      rasa.utils.common.configure_logging_and_warnings(args.loglevel)
      rasa.utils.io.configure_colored_logging(args.loglevel)
  
      if not credentials_path:
          credentials_path = _prepare_credentials_for_rasa_x(
              args.credentials, rasa_x_url=rasa_x_url
          )
  
      serve_application(
          endpoints=endpoints,
          port=args.port,
          credentials=credentials_path,
          cors=args.cors,
          auth_token=args.auth_token,
          enable_api=True,
          jwt_secret=args.jwt_secret,
          jwt_method=args.jwt_method,
          ssl_certificate=args.ssl_certificate,
          ssl_keyfile=args.ssl_keyfile,
          ssl_ca_file=args.ssl_ca_file,
          ssl_password=args.ssl_password,
      )
  
imports: import argparse
  import asyncio
  import logging
  from pathlib import Path
  import signal
  from typing import Iterable, List, Optional, Text, Tuple, Union
  import aiohttp
  import ruamel.yaml
  from rasa.cli import SubParsersAction
  from rasa.cli.arguments import x
  import rasa.cli.utils
  from rasa.shared.constants import DEFAULT_CREDENTIALS_PATH, DEFAULT_ENDPOINTS_PATH
  from rasa.core.utils import AvailableEndpoints
  import rasa.shared.utils.cli
  import rasa.shared.utils.io
  import rasa.utils.common
  import rasa.utils.io
label_desc: Use image node_id 2 for calling a global function with example usage: _rasa_service(args, endpoints, rasa_x_url, credentials_path) without return types