def progress_add(toppath, *paths):
 with progress_write() as state:
  imported = state.setdefault(toppath, [])
  for path in paths:
   if (imported and (imported[(len(imported) - 1)] <= path)):
    imported.append(path)
   else:
    insort(imported, path)

def progress_add ( toppath , * paths ) : with progress_write ( ) as state : imported = state . setdefault ( toppath , [ ] ) for path in paths : if ( imported and ( imported [ ( len ( imported ) - 1 ) ] <= path ) ) : imported . append ( path ) else : insort ( imported , path )
record that the files under all of the paths have been imported under toppath .