code: def ds_get(args):
      print("Download dataset id {}".format(args.id))
      check_null_id(args)
      print_args(args)
      ds = Dataset.get(dataset_id=args.id)
      if args.overwrite:
          if args.copy:
              # noinspection PyBroadException
              try:
                  shutil.rmtree(args.copy)
              except Exception:
                  pass
              Path(args.copy).mkdir(parents=True, exist_ok=True)
          elif args.link:
              # noinspection PyBroadException
              try:
                  shutil.rmtree(args.link)
              except Exception:
                  pass
      if args.copy:
          ds_folder = args.copy
          ds.get_mutable_local_copy(
              target_folder=ds_folder,
              part=args.part,
              num_parts=args.num_parts,
              max_workers=args.max_workers,
          )
      else:
          if args.link:
              Path(args.link).mkdir(parents=True, exist_ok=True)
              # noinspection PyBroadException
              try:
                  Path(args.link).rmdir()
              except Exception:
                  try:
                      Path(args.link).unlink()
                  except Exception:
                      raise ValueError(
                          "Target directory {} is not empty. Use --overwrite.".format(
                              args.link
                          )
                      )
          ds_folder = ds.get_local_copy(
              part=args.part,
              num_parts=args.num_parts,
              max_workers=args.max_workers,
          )
          if args.link:
              os.symlink(ds_folder, args.link)
              ds_folder = args.link
      print(
          "Dataset local copy available for files at: {}".format(
              ds_folder
          )
      )
      return 0
  
imports: import json
  import os
  import shutil
  from argparse import ArgumentParser, HelpFormatter
  from functools import partial
  from typing import Sequence
  from pathlib2 import Path
  import clearml.backend_api.session
  from clearml.datasets import Dataset
  from clearml.version import __version__
label_desc: Use image node_id 10 for calling a global function with example usage: ds_get(args) and returns: int