Generator that yields filtered and/or sorted items from the specified
    "container".

    :param container: The container has to be a dictionary of dictionaries that
        contain some kind of items. Depending on the specified parameters all or
        a subset of these items are yielded.
        ``{containerKey1: {key1: item1, key2: item2, ...}, ...}``
    :param containerKeys: valid keys of the "container", if None all keys are
        considered.
    :type containerKeys: a single dictionary key or a list of keys
    :param sort: if "sort" is specified the returned list of items is sorted
        according to the item attribute specified by "sort", if the attribute is
        not present the item is skipped.
    :param reverse: bool, ``True`` reverses the sort order
    :param selector: a function which is called with each item and returns
        True (include item) or False (discard item). If not specified all items
        are returned

    :returns: items from container that passed the selector function

def _getItems(container, containerKeys=None, sort=False, reverse=False,
              selector=lambda item: True):
    """Generator that yields filtered and/or sorted items from the specified
    "container".

    :param container: The container has to be a dictionary of dictionaries that
        contain some kind of items. Depending on the specified parameters all or
        a subset of these items are yielded.
        ``{containerKey1: {key1: item1, key2: item2, ...}, ...}``
    :param containerKeys: valid keys of the "container", if None all keys are
        considered.
    :type containerKeys: a single dictionary key or a list of keys
    :param sort: if "sort" is specified the returned list of items is sorted
        according to the item attribute specified by "sort", if the attribute is
        not present the item is skipped.
    :param reverse: bool, ``True`` reverses the sort order
    :param selector: a function which is called with each item and returns
        True (include item) or False (discard item). If not specified all items
        are returned

    :returns: items from container that passed the selector function
    """
    if containerKeys is None:
        containerKeys = [_ for _ in viewkeys(container)]
    else:
        containerKeys = aux.toList(containerKeys)

    if sort:
        sortIdentifier = list()
        for containerKey in containerKeys:
            for identifier in [_ for _ in viewkeys(container[containerKey])]:
                item = container[containerKey][identifier]
                if selector(item):
                    try:
                        sortIdentifier.append((getattr(item, sort),
                                               containerKey, identifier
                                               )
                                              )
                    except AttributeError:
                        pass
        sortIdentifier.sort(key=ITEMGETTER(0), reverse=reverse)
        for _, containerKey, identifier in sortIdentifier:
            yield container[containerKey][identifier]
    else:
        for containerKey in containerKeys:
            for identifier in [_ for _ in viewkeys(container[containerKey])]:
                item = container[containerKey][identifier]
                if selector(item):
                    yield item