original_docstring: 
      Takes a folder full of subfolders full of rasters, then creates a subfolder in the target folder and
      copies all appropriate rasters to that subfolder.
  
      Args:
          data_folder: the folder full of data subfolders
          target_folder: the parent folder that the new subdirectories will be put in
  
      Returns:
          None
      
docstring: Takes a folder full of subfolders full of rasters, then creates a subfolder in the target folder and
  copies all appropriate rasters to that subfolder.
docstring_tokens: Takes a folder full of subfolders full of rasters then creates a subfolder in the target folder and copies all appropriate rasters to that subfolder .
code: def copy_tiles(data_folder, target_folder, overwrite=False):
      """
      Takes a folder full of subfolders full of rasters, then creates a subfolder in the target folder and
      copies all appropriate rasters to that subfolder.
  
      Args:
          data_folder: the folder full of data subfolders
          target_folder: the parent folder that the new subdirectories will be put in
  
      Returns:
          None
      """
  
      subs = os.listdir(data_folder)
  
      if not isinstance(subs, list):
          subs = [subs]
      n_subs = len(subs)
  
      start = time.time()
  
      if overwrite and os.path.exists(target_folder):
          print(f'Overwriting {target_folder}....')
          shutil.rmtree(target_folder)
  
      if not os.path.exists(target_folder):
          os.mkdir(target_folder)
  
      for i,sub in enumerate(subs):
          intermediate1 = time.time()
          print(f'Copying products from {sub}')
          current = os.path.join(data_folder,sub)
          files = os.listdir(current)
          file_types = [f[-9:-4] for f in files]
  
          for file,ftype in zip(files,file_types):
              target = os.path.join(target_folder,ftype)
              if not os.path.exists(target):
                  print(f'MAKING {target}')
                  os.mkdir(target)
              to_copy = os.path.join(current,file)
              to_write = os.path.join(target,file)
              if not os.path.exists(to_write):
                  shutil.copyfile(to_copy, to_write)
              else:
                  print(f'{file} already present in target folder. Skipping....')
                  continue
  
          intermediate2 = time.time()
          intermediate_elap = round(intermediate2-intermediate1, 2) # in seconds
          running_time = round(intermediate2-start, 2)/60 # in minutes
          frac_progress = (i+1)/n_subs
          estimated_total_time = round(running_time*(1/frac_progress) - running_time, 2)
  
          print(f'Processing time: {intermediate_elap} seconds. Folder {i+1} of {n_subs} complete. Estimated time remaining: '
                f'{estimated_total_time} minutes')
  
      final = time.time()
      elap = round(final-start, 2)
      print(f'FINISHED. Elapsed time: {elap/60} minutes')
code_tokens: def copy_tiles ( data_folder , target_folder , overwrite = False ) : subs = os . listdir ( data_folder ) if not isinstance ( subs , list ) : subs = [ subs ] n_subs = len ( subs ) start = time . time ( ) if overwrite and os . path . exists ( target_folder ) : print ( f'Overwriting {target_folder}....' ) shutil . rmtree ( target_folder ) if not os . path . exists ( target_folder ) : os . mkdir ( target_folder ) for i , sub in enumerate ( subs ) : intermediate1 = time . time ( ) print ( f'Copying products from {sub}' ) current = os . path . join ( data_folder , sub ) files = os . listdir ( current ) file_types = [ f [ - 9 : - 4 ] for f in files ] for file , ftype in zip ( files , file_types ) : target = os . path . join ( target_folder , ftype ) if not os . path . exists ( target ) : print ( f'MAKING {target}' ) os . mkdir ( target ) to_copy = os . path . join ( current , file ) to_write = os . path . join ( target , file ) if not os . path . exists ( to_write ) : shutil . copyfile ( to_copy , to_write ) else : print ( f'{file} already present in target folder. Skipping....' ) continue intermediate2 = time . time ( ) intermediate_elap = round ( intermediate2 - intermediate1 , 2 ) running_time = round ( intermediate2 - start , 2 ) / 60 frac_progress = ( i + 1 ) / n_subs estimated_total_time = round ( running_time * ( 1 / frac_progress ) - running_time , 2 ) print ( f'Processing time: {intermediate_elap} seconds. Folder {i+1} of {n_subs} complete. Estimated time remaining: ' f'{estimated_total_time} minutes' ) final = time . time ( ) elap = round ( final - start , 2 ) print ( f'FINISHED. Elapsed time: {elap/60} minutes' )
short_docstring: Takes a folder full of subfolders full of rasters, then creates a subfolder in the target folder and
  copies all appropriate rasters to that subfolder.
short_docstring_tokens: Takes a folder full of subfolders full of rasters then creates a subfolder in the target folder and copies all appropriate rasters to that subfolder .
comment: """
      Takes a folder full of subfolders full of rasters, then creates a subfolder in the target folder and
      copies all appropriate rasters to that subfolder.
  
      Args:
          data_folder: the folder full of data subfolders
          target_folder: the parent folder that the new subdirectories will be put in
  
      Returns:
          None
      """$SEP$# in seconds$SEP$# in minutes