code: def sync_files(source, dest):
      """Syncs files copies files from `source` directory to the
      `dest` directory.  A check is first done to see if the `dest`
      directory exists, if so, the directory is removed to provide
      a clean install.
      """
      if os.path.isdir(source) and os.path.isdir(dest):
          try:
              print("Remove {0}".format(dest))
              shutil.rmtree(dest)
          except OSError as e:
              # An error occured tyring to remove directory
              print(e.errno)
              print(e.filename)
              print(e.strerror)
  
      print("Copying {0} to {1}".format(source, dest))
      shutil.copytree(source, dest)
  
imports: import os
  import subprocess
  import sys
  import warnings
  import shutil
label_desc: Use image node_id 5 for calling a global function with example usage: sync_files(source, dest) without return types