code: def get_path(url, root_dir, md5sum=None, check_exist=True):
      """Download from given url to root_dir.
      if file or directory specified by url is exists under
      root_dir, return the path directly, otherwise download
      from url and decompress it, return the path.
  
      url (str): download url
      root_dir (str): root dir for downloading, it should be
                      WEIGHTS_HOME or DATASET_HOME
      md5sum (str): md5 sum of download package
      """
      # parse path after download to decompress under root_dir
      fullpath = map_path(url, root_dir)
  
      # For same zip file, decompressed directory name different
      # from zip file name, rename by following map
      decompress_name_map = {
          "VOCtrainval_11-May-2012": "VOCdevkit/VOC2012",
          "VOCtrainval_06-Nov-2007": "VOCdevkit/VOC2007",
          "VOCtest_06-Nov-2007": "VOCdevkit/VOC2007",
          "annotations_trainval": "annotations",
      }
      for k, v in decompress_name_map.items():
          if fullpath.find(k) >= 0:
              fullpath = osp.join(osp.split(fullpath)[0], v)
  
      if osp.exists(fullpath) and check_exist:
          if not osp.isfile(fullpath) or _check_exist_file_md5(
              fullpath, md5sum, url
          ):
              logger.debug("Found {}".format(fullpath))
              return fullpath, True
          else:
              os.remove(fullpath)
  
      fullname = _download_dist(url, root_dir, md5sum)
  
      # new weights format which postfix is 'pdparams' not
      # need to decompress
      if osp.splitext(fullname)[-1] not in [
          ".pdparams",
          ".yml",
          ".ttf",
      ]:
          _decompress_dist(fullname)
  
      return fullpath, False
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import os
  import os.path
  import sys
  import yaml
  import time
  import shutil
  import requests
  import tqdm
  import hashlib
  import base64
  import binascii
  import tarfile
  import zipfile
  import errno
  from paddle.utils.download import _get_unique_endpoints
  from ppdet.core.workspace import BASE_KEY
  from .logger import setup_logger
  from .voc_utils import create_list
label_desc: Use image node_id 8 for calling a global function with example usage: get_path(url, root_dir, md5sum, check_exist) and returns: fullpath,  False, fullpath,  True