code: def _ar_data(self, ar):
          
          if not ar:
              return {}
  
          if ar.portal_type == "AnalysisRequest":
              return {'obj': ar,
                      'id': ar.getId(),
                      'date_received': self.ulocalized_time(
                          ar.getDateReceived(), long_format=0),
                      'date_sampled': self.ulocalized_time(
                          ar.getDateSampled(), long_format=True),
                      'url': ar.absolute_url(), }
          elif ar.portal_type == "ReferenceSample":
              return {'obj': ar,
                      'id': ar.id,
                      'date_received': self.ulocalized_time(
                          ar.getDateReceived(), long_format=0),
                      'date_sampled': self.ulocalized_time(
                          ar.getDateSampled(), long_format=True),
                      'url': ar.absolute_url(), }
          else:
              return {'obj': ar,
                      'id': ar.id,
                      'date_received': "",
                      'date_sampled': "",
                      'url': ar.absolute_url(), }
docs: Returns a dict that represents the analysis request