code: def download_lsun(lsun_dir, category, dset, tag, overwrite=False):
      """
      Download LSUN data and unpack
  
      Arguments:
          lsun_dir (str): LSUN data directory
          category (str): LSUN category
          dset (str): dataset, "train", "val", or "test"
          tag (str): version tag, use "latest" for most recent
          overwrite (bool): whether to overwrite existing data
      """
      dfile = (
          "test_lmdb"
          if dset == "test"
          else "{0}_{1}_lmdb".format(category, dset)
      )
      dfile = os.path.join(lsun_dir, dfile)
      if not os.path.exists(dfile) or overwrite:
          dfile += ".zip"
          if os.path.exists(dfile):
              os.remove(dfile)
          url = (
              LSUN_URL
              + "download.cgi?tag={0}&category={1}&set={2}".format(
                  tag, category, dset
              )
          )
          print("Data download might take a long time.")
          print("Downloading {0} {1} set...".format(category, dset))
          subprocess.call(["curl", url, "-o", dfile])
          print("Extracting {0} {1} set...".format(category, dset))
          zf = zipfile.ZipFile(dfile, "r")
          zf.extractall(lsun_dir)
          zf.close()
          print("Deleting {}...".format(dfile))
          os.remove(dfile)
      else:
          pass  # data already downloaded
      print(
          "LSUN {0} {1} dataset downloaded and unpacked.".format(
              category, dset
          )
      )
  
file_path: neon/examples/gan/lsun_data.py
imports: import numpy
  import os
  import shutil
  import subprocess
  import json
  import zipfile
  import logging
  from tqdm import tqdm
  from PIL import Image
  from neon.data.aeon_shim import AeonDataLoader
  from neon.data.dataloader_transformers import OneHot, TypeCast, ValueNormalize
  from neon.util.persist import get_data_cache_or_nothing
  from future import standard_library
  from future.moves.urllib.request import urlopen
label_desc: Use image node_id 2 for calling a global function with example usage: download_lsun(lsun_dir, category, dset, tag, overwrite) without return types