def isinstance(self, instance, class_name):
        """Check if a BaseNode is an instance of a registered dynamic class"""
        if isinstance(instance, BaseNode):
            klass = self.dynamic_node_classes.get(class_name, None)
            if klass:
                return isinstance(instance, klass)
            # Not an instance of a class in the registry
            return False
        else:
            raise TypeError("This function can only be used for BaseNode objects")
Check if a BaseNode is an instance of a registered dynamic class