def get_memberdef_nodes_and_signatures(self, node, kind):
sig_dict = {}<EOL>sig_prefix = '<STR_LIT>'<EOL>if kind in ('<STR_LIT:file>', '<STR_LIT>'):<EOL><INDENT>ns_node = node.getElementsByTagName('<STR_LIT>')<EOL>if not ns_node and kind == '<STR_LIT>':<EOL><INDENT>ns_node = node.getElementsByTagName('<STR_LIT>')<EOL><DEDENT>if ns_node:<EOL><INDENT>sig_prefix = self.extract_text(ns_node[<NUM_LIT:0>]) + '<STR_LIT>'<EOL><DEDENT><DEDENT>elif kind in ('<STR_LIT:class>', '<STR_LIT>'):<EOL><INDENT>cn_node = node.getElementsByTagName('<STR_LIT>')<EOL>sig_prefix = self.extract_text(cn_node[<NUM_LIT:0>]) + '<STR_LIT>'<EOL><DEDENT>md_nodes = self.get_specific_subnodes(node, '<STR_LIT>', recursive=<NUM_LIT:2>)<EOL>for n in md_nodes:<EOL><INDENT>if n.attributes['<STR_LIT>'].value != '<STR_LIT>':<EOL><INDENT>continue<EOL><DEDENT>if n.attributes['<STR_LIT>'].value in ['<STR_LIT>', '<STR_LIT>']:<EOL><INDENT>continue<EOL><DEDENT>if not self.get_specific_subnodes(n, '<STR_LIT>'):<EOL><INDENT>continue<EOL><DEDENT>name = self.extract_text(self.get_specific_subnodes(n, '<STR_LIT:name>'))<EOL>if name[:<NUM_LIT:8>] == '<STR_LIT>':<EOL><INDENT>continue<EOL><DEDENT>sig = sig_prefix + name<EOL>if sig in sig_dict:<EOL><INDENT>sig_dict[sig].append(n)<EOL><DEDENT>else:<EOL><INDENT>sig_dict[sig] = [n]<EOL><DEDENT><DEDENT>return sig_dict<EOL>
Collects the memberdef nodes and corresponding signatures that
        correspond to public function entries that are at most depth 2 deeper
        than the current (compounddef) node. Returns a dictionary with 
        function signatures (what swig expects after the %feature directive)
        as keys, and a list of corresponding memberdef nodes as values.