code: def get_second_level_dataset():
      """Lightweight dataset for multi-subject analysis"""
      # define several paths
      url = "ftp://ftp.cea.fr/pub/dsv/madic/download/nipy"
      mask_image = os.path.join(DATA_DIR, "mask.nii.gz")
      input_image = os.path.join(DATA_DIR, "spmT_0029.nii.gz")
      group_data = os.path.join(DATA_DIR, "group_t_images.tar.gz")
  
      # if needed create DATA_DIR
      if not os.path.exists(DATA_DIR):
          os.makedirs(DATA_DIR)
          assert os.path.exists(DATA_DIR)
  
      # download mask_image if necessary
      if not os.path.exists(mask_image):
          filename = "mask.nii.gz"
          datafile = os.path.join(url, filename)
          fp = urlopen(datafile)
          local_file = open(mask_image, "wb")
          local_file.write(fp.read())
          local_file.flush()
          local_file.close()
  
      # download input_image if necessary
      if not os.path.exists(input_image):
          filename = "spmT_0029.nii.gz"
          datafile = os.path.join(url, filename)
          fp = urlopen(datafile)
          local_file = open(input_image, "wb")
          local_file.write(fp.read())
          local_file.flush()
          local_file.close()
  
      # download group_data if necessary
      if not os.path.exists(group_data):
          filename = "group_t_images.tar.gz"
          datafile = os.path.join(url, filename)
          fp = urlopen(datafile)
          local_file = open(group_data, "wb")
          local_file.write(fp.read())
          local_file.flush()
          local_file.close()
  
      # untargzip group_data
      tar = tarfile.open(group_data)
      tar.extractall(DATA_DIR)
      tar.close()
      os.remove(group_data)
      return DATA_DIR
  
imports: import os
  import tarfile
  from nibabel.data import get_nipy_user_dir
label_desc: Use image node_id 1 for calling a global function with example usage: get_second_level_dataset() and returns: DATA_DIR