def METHOD_NAME(duplicate_chunks):
    for path in duplicate_chunks:
        # deconstruct relevant information from chunk path, clean it
        path_components = path.split("/")
        if len(path_components) == 5:
            _, study_obj_id, username, data_stream, timestamp = path.split("/")
        elif len(path_components) == 4:
            study_obj_id, username, data_stream, timestamp = path.split("/")
        else:
            print("You appear to have an invalid file path.  Please report this error to https://github.com/onnela-lab/beiwe-backend/issues")
            raise Exception("invalid_path: %s" % path)
        # not all files are chunkable, they will require different logic.
        if data_stream not in CHUNKABLE_FILES:
            remove_all_but_one_chunk(path)
            continue
        else:
            try:
                FileToProcess.reprocess_originals_from_chunk_path(path)
            except Exception as e:
                if "did not find any matching files" in str(e):
                    pass
                else:
                    raise
            remove_all_but_one_chunk(path)