def list(self, term=None):
if not self._state:<EOL><INDENT>raise InvalidState("<STR_LIT>")<EOL><DEDENT>self._process_state()<EOL>if not self._state[<NUM_LIT:1>]:<EOL><INDENT>self._log.info("<STR_LIT>")<EOL>return list()<EOL><DEDENT>monitors = list()<EOL>for monitor in self._state[<NUM_LIT:1>][<NUM_LIT:1>]:<EOL><INDENT>obj = dict()<EOL>obj['<STR_LIT>'] = monitor[<NUM_LIT:1>]<EOL>obj['<STR_LIT>'] = monitor[-<NUM_LIT:1>]<EOL>obj['<STR_LIT>'] = monitor[<NUM_LIT:2>][<NUM_LIT:3>][<NUM_LIT:1>]<EOL>if term and obj['<STR_LIT>'] != term:<EOL><INDENT>continue<EOL><DEDENT>obj['<STR_LIT>'] = monitor[<NUM_LIT:2>][<NUM_LIT:3>][<NUM_LIT:3>][<NUM_LIT:1>]<EOL>obj['<STR_LIT>'] = monitor[<NUM_LIT:2>][<NUM_LIT:3>][<NUM_LIT:3>][<NUM_LIT:2>]<EOL>obj['<STR_LIT>'] = self.DELIVERY[monitor[<NUM_LIT:2>][<NUM_LIT:6>][<NUM_LIT:0>][<NUM_LIT:1>]]<EOL>obj['<STR_LIT>'] = self.MONITOR_MATCH_TYPE[monitor[<NUM_LIT:2>][<NUM_LIT:5>]]<EOL>if obj['<STR_LIT>'] == '<STR_LIT>':<EOL><INDENT>obj['<STR_LIT>'] = self.ALERT_FREQ[monitor[<NUM_LIT:2>][<NUM_LIT:6>][<NUM_LIT:0>][<NUM_LIT:4>]]<EOL>obj['<STR_LIT>'] = monitor[<NUM_LIT:2>][<NUM_LIT:6>][<NUM_LIT:0>][<NUM_LIT:2>]<EOL><DEDENT>else:<EOL><INDENT>rss_id = monitor[<NUM_LIT:2>][<NUM_LIT:6>][<NUM_LIT:0>][<NUM_LIT:11>]<EOL>url = "<STR_LIT>"<EOL>obj['<STR_LIT>'] = url.format(uid=obj['<STR_LIT>'], fid=rss_id)<EOL><DEDENT>monitors.append(obj)<EOL><DEDENT>return monitors<EOL>
List alerts configured for the account.