<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _GenerateNotices(self):
 """Generate a summary of any notices. Returns: The generated HTML as a string. """

    items = []
    for e in self._notices:
      d = e.GetDictToFormat()
      if 'url' in d.keys():
        d['url'] = '<a href="%(url)s">%(url)s</a>' % d
      items.append('<li class="notice">%s</li>' %
                   e.FormatProblem(d).replace('\n', '<br>'))
    if items:
      return '<h2>Notices:</h2>\n<ul>%s</ul>\n' % '\n'.join(items)
    else:
      return ''