code: def clean(self, ds_name=None, data_frequency=None):
      if ds_name is None:
          mktplace_root = get_marketplace_folder()
          folders = [
              os.path.basename(f.rstrip("/"))
              for f in glob.glob("{}/*/".format(mktplace_root))
              if "temp_bundles" not in f
          ]
  
          while True:
              for idx, f in enumerate(folders):
                  print("{}\t{}".format(idx, f))
              dataset_num = input(
                  "Choose the dataset you want to "
                  "clean [0..{}]: ".format(len(folders) - 1)
              )
              try:
                  dataset_num = int(dataset_num)
              except ValueError:
                  print(
                      "Enter a number between 0 and {}".format(
                          len(folders) - 1
                      )
                  )
              else:
                  if dataset_num not in range(0, len(folders)):
                      print(
                          "Enter a number between 0 and {}".format(
                              len(folders) - 1
                          )
                      )
                  else:
                      ds_name = folders[dataset_num]
                      break
  
      ds_name = ds_name.lower()
  
      if data_frequency is None:
          folder = get_data_source_folder(ds_name)
  
      else:
          folder = get_bundle_folder(ds_name, data_frequency)
  
      shutil.rmtree(folder)
  
imports: from __future__ import print_function
  import glob
  import json
  import os
  import re
  import shutil
  import sys
  import time
  import webbrowser
  import bcolz
  import logbook
  import pandas
  import requests
  from requests_toolbelt import MultipartDecoder
  from requests_toolbelt.multipart.decoder import NonMultipartContentTypeException
  from catalyst.constants import LOG_LEVEL, AUTH_SERVER, ETH_REMOTE_NODE, MARKETPLACE_CONTRACT, MARKETPLACE_CONTRACT_ABI, ENIGMA_CONTRACT, ENIGMA_CONTRACT_ABI, TERMS_AND_CONDITIONS
  from catalyst.exchange.utils.stats_utils import set_print_settings
  from catalyst.marketplace.marketplace_errors import MarketplaceDatasetNotFound, MarketplaceNoAddressMatch, MarketplaceHTTPRequest, MarketplaceNoCSVFiles, MarketplaceRequiresPython3
  from catalyst.marketplace.utils.auth_utils import get_key_secret, get_signed_headers
  from catalyst.marketplace.utils.eth_utils import bin_hex, from_grains, to_grains
  from catalyst.marketplace.utils.path_utils import get_bundle_folder, get_data_source_folder, get_marketplace_folder, get_user_pubaddr, get_temp_bundles_folder, extract_bundle, save_user_pubaddr
  from catalyst.utils.paths import ensure_directory
label_desc: Use image node_id 12 for calling the Marketplace obj's underlying member method code with example usage: obj.clean(ds_name, data_frequency) without return types