code: def ds_list(args):
      print(
          "List dataset content: {}".format(
              args.id or (args.project, args.name)
          )
      )
      print_args(args)
      ds = Dataset.get(
          dataset_id=args.id or None,
          dataset_project=args.project or None,
          dataset_name=args.name or None,
          dataset_version=args.version,
      )
      filters = args.filter if args.filter else [None]
      file_entries = ds.file_entries_dict
      link_entries = ds.link_entries_dict
      file_name_max_len, size_max_len, hash_max_len = 64, 10, 64
      files_cache = []
      for mask in filters:
          files = ds.list_files(
              dataset_path=mask,
              dataset_id=ds.id if args.modified else None,
          )
          files_cache.append(files)
          for f in files:
              e = link_entries.get(f)
              if file_entries.get(f):
                  e = file_entries[f]
              file_name_max_len = max(
                  file_name_max_len, len(e.relative_path)
              )
              size_max_len = max(size_max_len, len(str(e.size)))
              hash_max_len = max(hash_max_len, len(str(e.hash)))
      print("Listing dataset content")
      formatting = (
          "{:"
          + str(file_name_max_len)
          + "} | {:"
          + str(size_max_len)
          + ",} | {:"
          + str(hash_max_len)
          + "}"
      )
      print(
          formatting.replace(",", "").format(
              "file name", "size", "hash"
          )
      )
      print(
          "-" * len(formatting.replace(",", "").format("-", "-", "-"))
      )
      num_files = 0
      total_size = 0
      for files in files_cache:
          num_files += len(files)
          for f in files:
              e = link_entries.get(f)
              if file_entries.get(f):
                  e = file_entries[f]
              print(
                  formatting.format(
                      e.relative_path, e.size, str(e.hash)
                  )
              )
              total_size += e.size
      print("Total {} files, {} bytes".format(num_files, total_size))
      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 11 for calling a global function with example usage: ds_list(args) and returns: int