code: def update_permissions_rejected_analysis_requests():
      
      workflow_tool = api.get_tool("portal_workflow")
      workflow = workflow_tool.getWorkflowById('bika_ar_workflow')
      catalog = api.get_tool(CATALOG_ANALYSIS_REQUEST_LISTING)
      brains = catalog(review_state='rejected')
      counter = 0
      total = len(brains)
      logger.info(
          "Changing permissions for rejected analysis requests. " +
          "Number of rejected analysis requests: {0}".format(total))
      for brain in brains:
          if 'LabClerk' not in brain.allowedRolesAndUsers:
              if counter % 100 == 0:
                  logger.info(
                      "Changing permissions for rejected analysis requests: " +
                      "{0}/{1}".format(counter, total))
              obj = api.get_object(brain)
              workflow.updateRoleMappingsFor(obj)
              obj.reindexObject()
          counter += 1
      logger.info(
          "Changed permissions for rejected analysis requests: " +
          "{0}/{1}".format(counter, total))
docs: Maps and updates the permissions for rejected analysis requests so lab clerks, clients, owners and
      RegulatoryInspector can see rejected analysis requests on lists.
  
      :return: None