code: def get_remote_dir_tree_to_local(
      remote_dir, local_dir, over_write=False
  ):
      if not os.path.exists(local_dir):
          os.makedirs(local_dir)
      # get remote file lists
      file_list = get_file_list(remote_dir, recursive=True)
      for file in file_list:
          local_subdir = os.path.join(
              local_dir, os.path.dirname(file)[len(remote_dir) + 1 :]
          )
          filename = os.path.basename(file)
          if not os.path.exists(local_subdir):
              os.makedirs(local_subdir)
          get_remote_file_to_local(
              file,
              os.path.join(local_subdir, filename),
              over_write=over_write,
          )
  
imports: import functools
  import glob
  import os
  import subprocess
  import tempfile
  import uuid
  from urllib.parse import urlparse
  import numpy
  from bigdl.dllib.utils.common import Sample, JTensor, JavaCreator, _get_gateway, _py2java, _java2py
  from bigdl.dllib.utils.log4Error import *
label_desc: Use image node_id 17 for calling a global function with example usage: get_remote_dir_tree_to_local(remote_dir, local_dir, over_write) without return types