class_docstr: Runtime to launch the LightningApp into multiple processes.
  
  The MultiProcessRuntime will generate 1 process for each :class:`~lightning.app.core.work.LightningWork` and attach
  queues to enable communication between the different processes.
class_docstr_tok: ["Runtime","to","launch","the","LightningApp","into","multiple","processes",".","The","MultiProcessRuntime","will","generate","1","process","for","each",":","class",":","`","~lightning.app.core.work.LightningWork","`","and","attach","queues","to","enable","communication","between","the","different","processes","."]
code: def terminate(self):
      if constants.APP_SERVER_IN_CLOUD:
          # Close all the ports open for the App within the App.
          ports = [self.port] + getattr(self.backend, "ports", [])
          for port in ports:
              disable_port(port)
      super().terminate()
  
imports: import multiprocessing
  import os
  from dataclasses import dataclass
  from typing import Any, Union
  import click
  from lightning.app.api.http_methods import _add_tags_to_api, _validate_api
  from lightning.app.core import constants
  from lightning.app.core.api import start_server
  from lightning.app.runners.backends import Backend
  from lightning.app.runners.runtime import Runtime
  from lightning.app.storage.orchestrator import StorageOrchestrator
  from lightning.app.utilities.app_helpers import _is_headless, is_overridden
  from lightning.app.utilities.commands.base import _commands_to_api, _prepare_commands
  from lightning.app.utilities.component import _set_flow_context, _set_frontend_context
  from lightning.app.utilities.load_app import extract_metadata_from_app
  from lightning.app.utilities.network import find_free_network_port
  from lightning.app.utilities.port import disable_port
label_desc: Use image node_id 2 for calling the MultiProcessRuntime obj's underlying member method code with example usage: obj.terminate() without return types