parameters: (max_age:int=TWO_WEEKS_SECONDS)
docstring: Cleans up the temporarily space of the cropped stacks.
      Such a stack is deleted if it is older than max_age, which
      is specified in seconds and defaults to two weeks.
docstring_summary: Cleans up the temporarily space of the cropped stacks.
      Such a stack is deleted if it is older than max_age, which
      is specified in seconds and defaults to two weeks.
docstring_tokens: Cleans up the temporarily space of the cropped stacks . Such a stack is deleted if it is older than max_age which is specified in seconds and defaults to two weeks .
function: def cleanup(max_age:int=TWO_WEEKS_SECONDS) -> None:
      """ Cleans up the temporarily space of the cropped stacks.
      Such a stack is deleted if it is older than max_age, which
      is specified in seconds and defaults to two weeks.
      """
      search_pattern = os.path.join(crop_output_path, file_prefix + "*." + file_extension)
      now = time()
      files_to_remove = []
      for item in glob.glob( search_pattern ):
          file_ctime = os.path.getctime( item )
          if (now - file_ctime) > max_age:
              files_to_remove.append(item)
      for item in files_to_remove:
          os.remove(item)
function_tokens: def cleanup ( max_age : int = TWO_WEEKS_SECONDS ) -> None : search_pattern = os . path . join ( crop_output_path , file_prefix + "*." + file_extension ) now = time ( ) files_to_remove = [ ] for item in glob . glob ( search_pattern ) : file_ctime = os . path . getctime ( item ) if ( now - file_ctime ) > max_age : files_to_remove . append ( item ) for item in files_to_remove : os . remove ( item )