def METHOD_NAME(self, name):
    child = getattr(self, name, None)
    if child is not None:
        options = getattr(child, MARKER_CHILD, None)
        if options is not None:
            condition = options["condition"]
            if condition and not condition(self):
                raise NoSuchNodeException(name)
            return child()
    raise NoSuchNodeException(name)