def METHOD_NAME(self, step, result):
    possible_fields = ["duration"]
    if step == UserNotificationPolicy.Step.WAIT:
        possible_fields.remove("duration")
    for field in possible_fields:
        result.pop(field, None)
    return result