code: def partition(molList, options):
      
      # set input variables
      status_field = options.status_field
      active_label = options.active_label
      decoy_label = options.decoy_label
  
      # initiate lists
      activeList = []
      decoyList = []
  
      # partition moList
      for mol in molList:
          if mol.GetProp(status_field) == active_label:
              activeList.append(mol)
          elif mol.GetProp(status_field) == decoy_label:
              decoyList.append(mol)
  
      # return partitions
      return activeList, decoyList
docs: Partition molList into activeList and decoyList