code: def _commands(self) -> List[str]:
      if (
          self.run_spec.configuration.entrypoint is not None
      ):  # docker-like format
          entrypoint = shlex.split(
              self.run_spec.configuration.entrypoint
          )
          commands = self.run_spec.configuration.commands
      elif self.run_spec.configuration.image is None:  # dstackai/base
          entrypoint = ["/bin/bash", "-i", "-c"]
          commands = [_join_shell_commands(self._shell_commands())]
      elif (
          self._shell_commands()
      ):  # custom docker image with shell commands
          entrypoint = ["/bin/sh", "-i", "-c"]
          commands = [_join_shell_commands(self._shell_commands())]
      else:  # custom docker image without commands
          raise NotImplemented()  # TODO read docker image manifest
      return entrypoint + commands
  
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 8 for calling the JobConfigurator obj's underlying member method code with example usage: obj._commands() and returns: unknown