def validate(self):
        # TODO: Decide whether I should try and enforce type structures.
        knownTypes = config.dfnTypes.union(["dfn"])
        for i, segment in enumerate(self.segments):
            if segment.type is None or segment.type in knownTypes:
                pass
            else:
                die("Unknown type '{0}' in global name '{1}'.", segment.type, str(self))
                self.valid = False
        return self
For now, just makes sure that types are well-known.
dataset/ETHPy150Open tabatkins/bikeshed/bikeshed/globalnames.py/GlobalName.validate