@property
    def referenced_types(self):
        types = set()
        for node in self.walk():
            if isinstance(node, Reference):
                types.add(node.dereference())

            elif isinstance(node, Type):
                types.add(node)

        types.discard(self)
        return types
Return a set of all types referenced in this type (in fields, methods, etc).
dataset/ETHPy150Open pdef/pdef/compiler/pdefc/lang.py/Type.referenced_types