Traverse the class hierarchy and accumulate the special sets of names
    ``MetaHasProps`` stores on classes:

    Args:
        name (str) : name of the special attribute to collect.

            Typically meaningful values are: ``__container_props__``,
            ``__properties__``, ``__properties_with_refs__``

def accumulate_from_superclasses(cls, propname):
    ''' Traverse the class hierarchy and accumulate the special sets of names
    ``MetaHasProps`` stores on classes:

    Args:
        name (str) : name of the special attribute to collect.

            Typically meaningful values are: ``__container_props__``,
            ``__properties__``, ``__properties_with_refs__``

    '''
    cachename = "__cached_all" + propname
    # we MUST use cls.__dict__ NOT hasattr(). hasattr() would also look at base
    # classes, and the cache must be separate for each class
    if cachename not in cls.__dict__:
        s = set()
        for c in inspect.getmro(cls):
            if issubclass(c, HasProps) and hasattr(c, propname):
                base = getattr(c, propname)
                s.update(base)
        setattr(cls, cachename, s)
    return cls.__dict__[cachename]