docstr: Return a command that downloads the code package from the datastore. We use various
  cloud storage CLI tools because we don't have access to Metaflow codebase (which we
  are about to download in the command).
  
  The command should download the package to "job.tar" in the current directory.
  
  It should work silently if everything goes well.
docstr_tok: ["Return","a","command","that","downloads","the","code","package","from","the","datastore",".","We","use","various","cloud","storage","CLI","tools","because","we","do","n't","have","access","to","Metaflow","codebase","(","which","we","are","about","to","download","in","the","command",")",".","The","command","should","download","the","package","to","``","job.tar","''","in","the","current","directory",".","It","should","work","silently","if","everything","goes","well","."]
code: def _get_download_code_package_cmd(
      self, code_package_url, datastore_type
  ):
      """Return a command that downloads the code package from the datastore. We use various
      cloud storage CLI tools because we don't have access to Metaflow codebase (which we
      are about to download in the command).
  
      The command should download the package to "job.tar" in the current directory.
  
      It should work silently if everything goes well.
      """
      if datastore_type == "s3":
          return (
              '%s -m awscli ${METAFLOW_S3_ENDPOINT_URL:+--endpoint-url=\\"${METAFLOW_S3_ENDPOINT_URL}\\"} '
              + "s3 cp %s job.tar >/dev/null"
          ) % (self._python(), code_package_url)
      elif datastore_type == "azure":
          from .plugins.azure.azure_utils import parse_azure_full_path
  
          container_name, blob = parse_azure_full_path(code_package_url)
          # remove a trailing slash, if present
          blob_endpoint = (
              "${METAFLOW_AZURE_STORAGE_BLOB_SERVICE_ENDPOINT%/}"
          )
          return "download-azure-blob --blob-endpoint={blob_endpoint} --container={container} --blob={blob} --output-file=job.tar".format(
              blob_endpoint=blob_endpoint,
              blob=blob,
              container=container_name,
          )
      elif datastore_type == "gs":
          from .plugins.gcp.gs_utils import parse_gs_full_path
  
          bucket_name, gs_object = parse_gs_full_path(code_package_url)
          return (
              "download-gcp-object --bucket=%s --object=%s --output-file=job.tar"
              % (bucket_name, gs_object)
          )
      else:
          raise NotImplementedError(
              "We don't know how to generate a download code package cmd for datastore %s"
              % datastore_type
          )
  
imports: import os
  import platform
  import sys
  from .util import get_username
  from .None import metaflow_version
  from metaflow.exception import MetaflowException
  from metaflow.extension_support import dump_module_info
  from metaflow.mflog import BASH_MFLOG
  from .None import R
label_desc: Use image node_id 9 for calling the MetaflowEnvironment obj's underlying member method code with example usage: obj._get_download_code_package_cmd(code_package_url, datastore_type) and returns: unknown, str, unknown