code: def on_shutdown(self) -> list[LifecycleHook]:
      on_shutdown: list[LifecycleHook] = [self.runner.destroy]
      for dispatcher in self.dispatchers.values():
          on_shutdown.append(dispatcher.shutdown)
      on_shutdown.extend(super().on_shutdown)
      return on_shutdown
  
imports: from __future__ import annotations
  import functools
  import json
  import logging
  import pickle
  import traceback
  import typing
  from typing import TYPE_CHECKING
  from simple_di import Provide
  from simple_di import inject
  from bentoml.exceptions import BentoMLException
  from bentoml.exceptions import ServiceUnavailable
  from ..configuration.containers import BentoMLContainer
  from ..context import component_context
  from ..context import trace_context
  from ..marshal.dispatcher import CorkDispatcher
  from ..runner.container import AutoContainer
  from ..runner.container import Payload
  from ..runner.utils import PAYLOAD_META_HEADER
  from ..runner.utils import Params
  from ..runner.utils import payload_paramss_to_batch_params
  from ..server.base_app import BaseAppFactory
  from ..types import LazyType
  from ..utils.metrics import exponential_buckets
label_desc: Use image node_id 5 for calling the RunnerAppFactory obj's underlying member method code with example usage: obj.on_shutdown() and returns: on_shutdown