Flag Function In Python With Parameters In Research