'Returns the nested elements that match the simple CSS selector.'

def search(self, e):

    tag = ((self.tag == '*') or self.tag)
    i = (lambda s: re.compile(('\\b%s(?=$|\\s)' % s), re.I))
    a = ({'id': i(self.id)} if self.id else {})
    a.update(map((lambda kv: (kv[0], kv[1])), self.attributes.items()))
    if (not isinstance(e, Element)):
        return []
    if ((len(self.classes) == 0) or (len(self.classes) >= 2)):
        e = map(Element, e._p.findAll(tag, attrs=a))
    if (len(self.classes) == 1):
        e = map(Element, e._p.findAll(tag, attrs=dict(a, **{'class': i(list(self.classes)[0])})))
    if (len(self.classes) >= 2):
        e = filter((lambda e: self.classes.issubset(set(e.attr.get('class', '').lower().split()))), e)
    if ('first-child' in self.pseudo):
        e = filter((lambda e: (e == self._first_child(e.parent))), e)
    if any((x.startswith('contains') for x in self.pseudo)):
        e = filter((lambda e: all((((not x.startswith('contains')) or self._contains(e, x)) for x in self.pseudo))), e)
    return e
