docs: def _get_patterns(installed_only=None, root=None):
      '''
      List all known patterns in repos.
      '''
      patterns = {}
      for element in __zypper__(root=root).nolock.xml.call('se', '-t', 'pattern').getElementsByTagName('solvable'):
          installed = element.getAttribute('status') == 'installed'
          if (installed_only and installed) or not installed_only:
              patterns[element.getAttribute('name')] = {
                  'installed': installed,
                  'summary': element.getAttribute('summary'),
              }
  
      return patterns