def METHOD_NAME(s3_file_path: str) -> str:
    if "duplicate" in s3_file_path:
        # duplicate files are named blahblah/datastream/unixtime.csv-duplicate-[rando-string]
        return s3_file_path.split("-duplicate")[0]
    else:
        return s3_file_path