# Path: xmanager/xm/job_blocks.py
# class SequentialArgs:
#   class _RegularItem:
#   class _KeywordItem:
# class ExecutableSpec(abc.ABC):
# class Executable(abc.ABC):
# class ExecutorSpec(abc.ABC):
# class Executor(abc.ABC):
# class Packageable:
# class Constraint(abc.ABC):
# class Job:
# class JobGroup:
#   def __init__(self) -> None:
#   def _ingest_regular_item(self, value: Any) -> None:
#   def _ingest_keyword_item(self, name: str, value: Any) -> None:
#   def _merge_from(self, args: 'SequentialArgs') -> None:
#     def import_regular_item(item: SequentialArgs._RegularItem):
#     def import_keyword_item(item: SequentialArgs._KeywordItem):
#   def from_collection(collection: Optional[UserArgs]) -> 'SequentialArgs':
#     def check_for_string(args: str) -> None:
#     def import_sequential_args(args: SequentialArgs) -> None:
#     def import_mapping(collection: Mapping[Any, Any]) -> None:
#     def import_sequence(collection: Sequence[Any]) -> None:
#   def to_list(
#       self,
#       escaper: Callable[[Any], str],
#       kwargs_joiner: Callable[[str, str], str] = utils.trivial_kwargs_joiner
#   ) -> List[str]:
#     def export_regular_item(item: SequentialArgs._RegularItem) -> str:
#     def export_keyword_item(item: SequentialArgs._KeywordItem) -> str:
#   def to_dict(self, kwargs_only: bool = False) -> Dict[str, Any]:
#     def export_regular_item(
#         item: SequentialArgs._RegularItem) -> Tuple[str, Any]:
#     def export_keyword_item(
#         item: SequentialArgs._KeywordItem) -> Tuple[str, Any]:
#   def __eq__(self, other) -> bool:
#   def __repr__(self) -> str:
# def merge_args(*operands: Union[SequentialArgs, UserArgs]) -> SequentialArgs:
#   def name(self) -> str:
#   def Spec(cls) -> ExecutorSpec:  # pylint: disable=invalid-name
#   def __init__(self,
#                *,
#                constraints: Optional[Sequence[Constraint]] = None,
#                **jobs: JobType) -> None:
# 
# Path: xmanager/xm/utils.py
# FLAGS = flags.FLAGS
# ARG_ESCAPER = pattern_matching.match(
#     pattern_matching.Case([ShellSafeArg], lambda v: v.arg),
#     pattern_matching.Case([enum.Enum], lambda v: shlex.quote(str(v.name))),
#     pattern_matching.Case([Any], lambda v: shlex.quote(str(v))),
# )
# class SpecialArg(abc.ABC):
# class ShellSafeArg(SpecialArg):
# def trivial_kwargs_joiner(key: str, value: str) -> str:
# def run_in_asyncio_loop(
#     f: Callable[..., ReturnType]) -> Callable[..., ReturnType]:
#   def decorated(*args, **kwargs) -> ReturnType:
# def find_launch_script_path() -> str:
# def resolve_path_relative_to_launcher(path: str) -> str:


import abc
import os
import re
import attr
from typing import List, NamedTuple, Optional, Union
from xmanager.xm import job_blocks
from xmanager.xm import utils
        [
          'RUN mkdir /workdir',
          'WORKDIR /workdir',
          'COPY cifar10/ /workdir/cifar10',
        ]
  """

  entrypoint: Union[ModuleName, CommandList]
  path: str = attr.ib(
      converter=utils.resolve_path_relative_to_launcher, default='.')
  base_image: Optional[str] = None
  docker_instructions: Optional[List[str]] = None
  use_deep_module: bool = False

  @property
  def name(self) -> str:
    return name_from_path(self.path)


class BinaryDependency(abc.ABC):
  """Additional resource for `Binary` / `BazelBinary`.

  Implementations can define backend-specific dependencies.

  BinaryDependency and its ancestors must be comparable and hashable and
  therefore immutable.
  """


@attr.s(auto_attribs=True)

# Path: xmanager/xm/job_blocks.py
# class SequentialArgs:
#   class _RegularItem:
#   class _KeywordItem:
# class ExecutableSpec(abc.ABC):
# class Executable(abc.ABC):
# class ExecutorSpec(abc.ABC):
# class Executor(abc.ABC):
# class Packageable:
# class Constraint(abc.ABC):
# class Job:
# class JobGroup:
#   def __init__(self) -> None:
#   def _ingest_regular_item(self, value: Any) -> None:
#   def _ingest_keyword_item(self, name: str, value: Any) -> None:
#   def _merge_from(self, args: 'SequentialArgs') -> None:
#     def import_regular_item(item: SequentialArgs._RegularItem):
#     def import_keyword_item(item: SequentialArgs._KeywordItem):
#   def from_collection(collection: Optional[UserArgs]) -> 'SequentialArgs':
#     def check_for_string(args: str) -> None:
#     def import_sequential_args(args: SequentialArgs) -> None:
#     def import_mapping(collection: Mapping[Any, Any]) -> None:
#     def import_sequence(collection: Sequence[Any]) -> None:
#   def to_list(
#       self,
#       escaper: Callable[[Any], str],
#       kwargs_joiner: Callable[[str, str], str] = utils.trivial_kwargs_joiner
#   ) -> List[str]:
#     def export_regular_item(item: SequentialArgs._RegularItem) -> str:
#     def export_keyword_item(item: SequentialArgs._KeywordItem) -> str:
#   def to_dict(self, kwargs_only: bool = False) -> Dict[str, Any]:
#     def export_regular_item(
#         item: SequentialArgs._RegularItem) -> Tuple[str, Any]:
#     def export_keyword_item(
#         item: SequentialArgs._KeywordItem) -> Tuple[str, Any]:
#   def __eq__(self, other) -> bool:
#   def __repr__(self) -> str:
# def merge_args(*operands: Union[SequentialArgs, UserArgs]) -> SequentialArgs:
#   def name(self) -> str:
#   def Spec(cls) -> ExecutorSpec:  # pylint: disable=invalid-name
#   def __init__(self,
#                *,
#                constraints: Optional[Sequence[Constraint]] = None,
#                **jobs: JobType) -> None:
# 
# Path: xmanager/xm/utils.py
# FLAGS = flags.FLAGS
# ARG_ESCAPER = pattern_matching.match(
#     pattern_matching.Case([ShellSafeArg], lambda v: v.arg),
#     pattern_matching.Case([enum.Enum], lambda v: shlex.quote(str(v.name))),
#     pattern_matching.Case([Any], lambda v: shlex.quote(str(v))),
# )
# class SpecialArg(abc.ABC):
# class ShellSafeArg(SpecialArg):
# def trivial_kwargs_joiner(key: str, value: str) -> str:
# def run_in_asyncio_loop(
#     f: Callable[..., ReturnType]) -> Callable[..., ReturnType]:
#   def decorated(*args, **kwargs) -> ReturnType:
# def find_launch_script_path() -> str:
# def resolve_path_relative_to_launcher(path: str) -> str:


# Path: xmanager/xm/executables.py
import abc
import os
import re
import attr
from typing import List, NamedTuple, Optional, Union
from xmanager.xm import job_blocks
from xmanager.xm import utils

        [
          'RUN mkdir /workdir',
          'WORKDIR /workdir',
          'COPY cifar10/ /workdir/cifar10',
        ]
  """

  entrypoint: Union[ModuleName, CommandList]
  path: str = attr.ib(
      converter=utils.resolve_path_relative_to_launcher, default='.')
  base_image: Optional[str] = None
  docker_instructions: Optional[List[str]] = None
  use_deep_module: bool = False

  @property
  def name(self) -> str:
    return name_from_path(self.path)


class BinaryDependency(abc.ABC):
  """Additional resource for `Binary` / `BazelBinary`.

  Implementations can define backend-specific dependencies.

  BinaryDependency and its ancestors must be comparable and hashable and
  therefore immutable.
  """


@attr.s(auto_attribs=True)

class Container(job_blocks.ExecutableSpec):