def _get_handler(self, node_id):
        """Get the handler of a given node."""
        handler = self._get_attrs(node_id).get(self.HANDLER, self._default_handler)

        # Here we make sure the handler is an instance of `BasicNodeHandler` or inherited
        # types. While generally being bad Python practice, we still need it here as an
        # invalid handler can cause IDA to crash.
        if not isinstance(handler, BasicNodeHandler):
            idaapi.msg(("Invalid handler for node {}: {}. All handlers must inherit from"
                        "`BasicNodeHandler`.").format(node_id, handler))
            handler = self._default_handler
        return handler
def _get_handler ( self , node_id ) : handler = self . _get_attrs ( node_id ) . get ( self . HANDLER , self . _default_handler ) if not isinstance ( handler , BasicNodeHandler ) : idaapi . msg ( ( "Invalid handler for node {}: {}. All handlers must inherit from" "`BasicNodeHandler`." ) . format ( node_id , handler ) ) handler = self . _default_handler return handler
Get the handler of a given node.