not_if to only_if in python