code: def normalize_selectors(self, _selectors, extra_selectors=None, extra_parents=None):
          _selectors = _spaces_re.sub(' ', _selectors)
          if isinstance(extra_selectors, basestring):
              extra_selectors = extra_selectors.split(',')
          if isinstance(extra_parents, basestring):
              extra_parents = extra_parents.split('&')
          parents = set()
          if ' extends ' in _selectors:
              selectors = set()
              for key in _selectors.split(','):
                  child, _, parent = key.partition(' extends ')
                  child = child.strip()
                  parent = parent.strip()
                  selectors.add(child)
                  parents.update(
                      s.strip() for s in parent.split('&') if s.strip())
          else:
              selectors = set(
                  s.strip() for s in _selectors.split(',') if s.strip())
          if extra_selectors:
              selectors.update(s.strip() for s in extra_selectors if s.strip())
          selectors.discard('')
          if not selectors:
              return ''
          if extra_parents:
              parents.update(s.strip() for s in extra_parents if s.strip())
          parents.discard('')
          if parents:
              return ','.join(sorted(selectors)) + ' extends ' + '&'.join(sorted(parents))
          return ','.join(sorted(selectors))