def __get_dict_item(class_object, key):
    """
    Return the class dictionary entry with key @p key; traverse the parent
    classes until a matching entry was found.  Otherwise raise an
    @c AttributeError.

    This function is not intended for direct use. 
    """
    for cls in class_object.__mro__:
        if key in cls.__dict__:
            return cls.__dict__[key]
    message = "object '{name}' has no attribute '{key}'"
    raise AttributeError(message.format(name=class_object.__name__, key=key))
