code: def before_sample(analysis_request):
      
      if not analysis_request.getDateSampled():
          analysis_request.setDateSampled(DateTime())
      if not analysis_request.getSampler():
          analysis_request.setSampler(api.get_current_user().id)
docs: Method triggered before "sample" transition for the Analysis Request
      passed in is performed