def _child_allowed(self, child_rule):
num_kids = self.node.children.count()<EOL>num_kids_allowed = len(self.rule.children)<EOL>if not self.rule.multiple_paths:<EOL><INDENT>num_kids_allowed = <NUM_LIT:1><EOL><DEDENT>if num_kids >= num_kids_allowed:<EOL><INDENT>raise AttributeError('<STR_LIT>' % (<EOL>self.rule_name, self.num_kids_allowed))<EOL><DEDENT>for node in self.node.children.all():<EOL><INDENT>if node.data.rule_label == child_rule.class_label:<EOL><INDENT>raise AttributeError('<STR_LIT>')<EOL><DEDENT><DEDENT>if child_rule not in self.rule.children:<EOL><INDENT>raise AttributeError('<STR_LIT>' % (<EOL>child_rule.__name__, self.rule_name))<EOL><DEDENT>
Called to verify that the given rule can become a child of the
        current node.  

        :raises AttributeError: 
            if the child is not allowed