docstr: Returns list of (path, arcname) to be added to the job package, where
  `arcname` is the alternative name for the file in the package.
docstr_tok: ["Returns","list","of","(","path",",","arcname",")","to","be","added","to","the","job","package",",","where","`","arcname","`","is","the","alternative","name","for","the","file","in","the","package","."]
code: def path_tuples(self):
      """
      Returns list of (path, arcname) to be added to the job package, where
      `arcname` is the alternative name for the file in the package.
      """
      # We want the following contents in the tarball
      # Metaflow package itself
      for path_tuple in self._walk(
          self.metaflow_root,
          exclude_hidden=False,
          suffixes=METAFLOW_SUFFIXES_LIST,
      ):
          yield path_tuple
  
      # Metaflow extensions; for now, we package *all* extensions but this may change
      # at a later date; it is possible to call `package_mfext_package` instead of
      # `package_mfext_all` but in that case, make sure to also add a
      # metaflow_extensions/__init__.py file to properly "close" the metaflow_extensions
      # package and prevent other extensions from being loaded that may be
      # present in the rest of the system
      for path_tuple in package_mfext_all():
          yield path_tuple
  
      # Any custom packages exposed via decorators
      deco_module_paths = {}
      for step in self._flow:
          for deco in step.decorators:
              for path_tuple in deco.add_to_package():
                  file_path, file_name = path_tuple
                  # Check if the path is not duplicated as
                  # many steps can have the same packages being imported
                  if file_name not in deco_module_paths:
                      deco_module_paths[file_name] = file_path
                      yield path_tuple
                  elif deco_module_paths[file_name] != file_path:
                      raise NonUniqueFileNameToFilePathMappingException(
                          file_name,
                          [deco_module_paths[file_name], file_path],
                      )
  
      # the package folders for environment
      for path_tuple in self.environment.add_to_package():
          yield path_tuple
      if R.use_r():
          # the R working directory
          for path_tuple in self._walk(
              "%s/" % R.working_dir(), suffixes=self.suffixes
          ):
              yield path_tuple
          # the R package
          for path_tuple in R.package_paths():
              yield path_tuple
      else:
          # the user's working directory
          flowdir = os.path.dirname(os.path.abspath(sys.argv[0])) + "/"
          for path_tuple in self._walk(flowdir, suffixes=self.suffixes):
              yield path_tuple
  
imports: import importlib
  import os
  import sys
  import tarfile
  import time
  import json
  from io import BytesIO
  from .extension_support import EXT_PKG, package_mfext_all
  from .metaflow_config import DEFAULT_PACKAGE_SUFFIXES
  from .exception import MetaflowException
  from .util import to_unicode
  from .None import R, INFO_FILE
label_desc: Use image node_id 3 for calling the MetaflowPackage obj's underlying member method code with example usage: obj.path_tuples() without return types