code: def guard_verify(obj):
      
  
      analyses = obj.getAnalyses()
      if not analyses:
          # An empty worksheet cannot be verified
          return False
  
      can_verify = False
      for analysis in obj.getAnalyses():
          # Dismiss analyses that are not active
          if not api.is_active(analysis):
              continue
          # Dismiss analyses that have been rejected or retracted
          if api.get_workflow_status_of(analysis) in ["rejected", "retracted"]:
              continue
          # Worksheet cannot be verified if there is one analysis not verified
          can_verify = IVerified.providedBy(analysis)
          if not can_verify:
              # No need to look further
              return False
  
      # This prevents the verification of the worksheet if all its analyses are in
      # a detached status (rejected, retracted or cancelled)
      return can_verify
docs: Returns True if 'verify' transition can be applied to the Worksheet
      passed in. This is, returns true if all the analyses assigned
      have already been verified. Those analyses that are in an inactive state
      (cancelled, inactive) are dismissed, but at least one analysis must be in
      an active state (and verified), otherwise always return False.
      Note this guard depends entirely on the current status of the children
      :returns: true or false