code: def update_notify_on_sample_invalidation(portal):
      
      setup = api.get_setup()
  
      # NotifyOnARRetract --> NotifyOnSampleInvalidation
      old_value = setup.__dict__.get("NotifyOnARRetract", True)
      setup.setNotifyOnSampleInvalidation(old_value)
  
      # NotifyOnRejection --> NotifyOnSampleRejection
      old_value = setup.__dict__.get("NotifyOnRejection", False)
      setup.setNotifyOnSampleRejection(old_value)
docs: The name of the Setup field was NotifyOnARRetract, so it was
      confusing. There was also two fields "NotifyOnRejection"