'Returns a new search object with additional search terms and-ed to the
filter string. term_dict maps attribute names to assertion values. If
you don\'t want the values escaped, pass escape=False.'

def search_with_additional_terms(self, term_dict, escape=True):

    term_strings = [self.filterstr]
    for (name, value) in term_dict.items():
        if escape:
            value = self.ldap.filter.escape_filter_chars(value)
        term_strings.append((u'(%s=%s)' % (name, value)))
    filterstr = (u'(&%s)' % ''.join(term_strings))
    return self.__class__(self.base_dn, self.scope, filterstr)
