'Return first object in the collection that maches all item=\'value\'
pairs passed, else return None if no objects can be found.
When return_list is set, can also return a list.  Empty list
would be returned instead of None in that case.'

def find(self, name=None, return_list=False, no_errors=False, **kargs):

    matches = []
    if (name is not None):
        kargs['name'] = name
    kargs = self.__rekey(kargs)
    if (len(kargs) == 0):
        raise CX(_('calling    find    with    no    arguments'))
    if ((len(kargs) == 1) and ('name' in kargs) and (not return_list)):
        return self.listing.get(kargs['name'].lower(), None)
    self.lock.acquire()
    try:
        for (name, obj) in self.listing.iteritems():
            if obj.find_match(kargs, no_errors=no_errors):
                matches.append(obj)
    finally:
        self.lock.release()
    if (not return_list):
        if (len(matches) == 0):
            return None
        return matches[0]
    else:
        return matches
