class_docstr: A class for managing Neptune experiment.
  
  Each time User creates new experiment instance of this class is created.
  It lets you manage experiment, :meth:`~neptune.experiments.Experiment.log_metric`,
  :meth:`~neptune.experiments.Experiment.log_text`,
  :meth:`~neptune.experiments.Experiment.log_image`,
  :meth:`~neptune.experiments.Experiment.set_property`,
  and much more.
  
  
  Args:
      backend (:obj:`neptune.ApiClient`): A ApiClient object
      project (:obj:`neptune.Project`): The project this experiment belongs to
      _id (:obj:`str`): Experiment id
      internal_id (:obj:`str`): internal ID
  
  Example:
      Assuming that `project` is an instance of :class:`~neptune.projects.Project`.
  
      .. code:: python3
  
          experiment = project.create_experiment()
  
  Warning:
      User should never create instances of this class manually.
      Always use: :meth:`~neptune.projects.Project.create_experiment`.
class_docstr_tok: ["A","class","for","managing","Neptune","experiment",".","Each","time","User","creates","new","experiment","instance","of","this","class","is","created",".","It","lets","you","manage","experiment",",",":","meth",":","`","~neptune.experiments.Experiment.log_metric","`",",",":","meth",":","`","~neptune.experiments.Experiment.log_text","`",",",":","meth",":","`","~neptune.experiments.Experiment.log_image","`",",",":","meth",":","`","~neptune.experiments.Experiment.set_property","`",",","and","much","more",".","Args",":","backend","(",":","obj",":","`","neptune.ApiClient","`",")",":","A","ApiClient","object","project","(",":","obj",":","`","neptune.Project","`",")",":","The","project","this","experiment","belongs","to","_id","(",":","obj",":","`","str","`",")",":","Experiment","id","internal_id","(",":","obj",":","`","str","`",")",":","internal","ID","Example",":","Assuming","that","`","project","`","is","an","instance","of",":","class",":","`","~neptune.projects.Project","`",".","..","code",":",":","python3","experiment","=","project.create_experiment","(",")","Warning",":","User","should","never","create","instances","of","this","class","manually",".","Always","use",":",":","meth",":","`","~neptune.projects.Project.create_experiment","`","."]
docstr: Download a directory or a single file from experiment's sources as a ZIP archive.
  
  Download a subdirectory (or file) ``path`` from the experiment sources and save it in ``destination_dir``
  as a ZIP archive. The name of an archive will be a name of downloaded directory (or file) with '.zip' extension.
  
  Args:
      path (:obj:`str`):
          Path of a directory or file in experiment sources to be downloaded.
          If ``None`` is passed, all source files will be downloaded.
  
      destination_dir (:obj:`str`): The directory where the archive will be downloaded.
          If ``None`` is passed, the archive will be downloaded to the current working directory.
  
  Raises:
      `NotADirectory`: When ``destination_dir`` is not a directory.
      `FileNotFound`: If a path in experiment sources does not exist.
  
  Examples:
      Assuming that `experiment` is an instance of :class:`~neptune.experiments.Experiment`.
  
      .. code:: python3
  
          # Download all experiment sources to current working directory
          experiment.download_sources()
  
          # Download a single directory
          experiment.download_sources('src/my-module')
  
          # Download all experiment sources to user-defined directory
          experiment.download_sources(destination_dir='/tmp/sources/')
  
          # Download a single directory to user-defined directory
          experiment.download_sources('src/my-module', 'sources/')
docstr_tok: ["Download","a","directory","or","a","single","file","from","experiment","'s","sources","as","a","ZIP","archive",".","Download","a","subdirectory","(","or","file",")","``","path","``","from","the","experiment","sources","and","save","it","in","``","destination_dir","``","as","a","ZIP","archive",".","The","name","of","an","archive","will","be","a","name","of","downloaded","directory","(","or","file",")","with","'.zip","'","extension",".","Args",":","path","(",":","obj",":","`","str","`",")",":","Path","of","a","directory","or","file","in","experiment","sources","to","be","downloaded",".","If","``","None","``","is","passed",",","all","source","files","will","be","downloaded",".","destination_dir","(",":","obj",":","`","str","`",")",":","The","directory","where","the","archive","will","be","downloaded",".","If","``","None","``","is","passed",",","the","archive","will","be","downloaded","to","the","current","working","directory",".","Raises",":","`","NotADirectory","`",":","When","``","destination_dir","``","is","not","a","directory",".","`","FileNotFound","`",":","If","a","path","in","experiment","sources","does","not","exist",".","Examples",":","Assuming","that","`","experiment","`","is","an","instance","of",":","class",":","`","~neptune.experiments.Experiment","`",".","..","code",":",":","python3","#","Download","all","experiment","sources","to","current","working","directory","experiment.download_sources","(",")","#","Download","a","single","directory","experiment.download_sources","(","'src\/my-module","'",")","#","Download","all","experiment","sources","to","user-defined","directory","experiment.download_sources","(","destination_dir='\/tmp\/sources\/","'",")","#","Download","a","single","directory","to","user-defined","directory","experiment.download_sources","(","'src\/my-module","'",",","'sources\/","'",")"]
code: def download_sources(self, path=None, destination_dir=None):
      """Download a directory or a single file from experiment's sources as a ZIP archive.
  
      Download a subdirectory (or file) ``path`` from the experiment sources and save it in ``destination_dir``
      as a ZIP archive. The name of an archive will be a name of downloaded directory (or file) with '.zip' extension.
  
      Args:
          path (:obj:`str`):
              Path of a directory or file in experiment sources to be downloaded.
              If ``None`` is passed, all source files will be downloaded.
  
          destination_dir (:obj:`str`): The directory where the archive will be downloaded.
              If ``None`` is passed, the archive will be downloaded to the current working directory.
  
      Raises:
          `NotADirectory`: When ``destination_dir`` is not a directory.
          `FileNotFound`: If a path in experiment sources does not exist.
  
      Examples:
          Assuming that `experiment` is an instance of :class:`~neptune.experiments.Experiment`.
  
          .. code:: python3
  
              # Download all experiment sources to current working directory
              experiment.download_sources()
  
              # Download a single directory
              experiment.download_sources('src/my-module')
  
              # Download all experiment sources to user-defined directory
              experiment.download_sources(destination_dir='/tmp/sources/')
  
              # Download a single directory to user-defined directory
              experiment.download_sources('src/my-module', 'sources/')
      """
      return self._backend.download_sources(self, path, destination_dir)
  
imports: import base64
  import logging
  import traceback
  import pandas
  import six
  from pandas.errors import EmptyDataError
  from neptune.common.experiments import LegacyExperiment
  from neptune.common.utils import align_channels_on_x, is_float, is_nan_or_inf
  from neptune.legacy.api_exceptions import ChannelDoesNotExist, ExperimentAlreadyFinished
  from neptune.legacy.exceptions import InvalidChannelValue, NeptuneIncorrectImportException, NoChannelValue
  from neptune.legacy.internal.channels.channels import ChannelNamespace, ChannelType, ChannelValue
  from neptune.legacy.internal.channels.channels_values_sender import ChannelsValuesSender
  from neptune.legacy.internal.execution.execution_context import ExecutionContext
  from neptune.legacy.internal.utils.deprecation import legacy_client_deprecation
  from neptune.legacy.internal.utils.image import get_image_content
label_desc: Use image node_id 29 for calling the Experiment obj's underlying member method code with example usage: obj.download_sources(path, destination_dir) and returns: self