code: def _app_specs(self) -> List[AppSpec]:
      specs = []
      for i, pm in enumerate(filter_reserved_ports(self._ports())):
          specs.append(
              AppSpec(
                  port=pm.container_port,
                  map_to_port=pm.local_port,
                  app_name=f"app_{i}",
              )
          )
      return specs
  
imports: import shlex
  import sys
  from abc import ABC, abstractmethod
  from typing import Dict, List, Optional
  import dstack.version
  from dstack._internal.core.models.configurations import ConfigurationType, PortMapping, PythonVersion, RegistryAuth
  from dstack._internal.core.models.profiles import SpotPolicy
  from dstack._internal.core.models.runs import AppSpec, DiskRequirements, Gateway, GpusRequirements, JobSpec, Requirements, RetryPolicy, RunSpec
  from dstack._internal.core.services.ssh.ports import filter_reserved_ports
label_desc: Use image node_id 9 for calling the JobConfigurator obj's underlying member method code with example usage: obj._app_specs() and returns: specs