def node_method(node, method_name):
 for n in node.local_attr(method_name):
  if isinstance(n, astroid.Function):
   return n
 raise astroid.NotFoundError(method_name)

def node_method ( node , method_name ) : for n in node . local_attr ( method_name ) : if isinstance ( n , astroid . Function ) : return n raise astroid . NotFoundError ( method_name )
get astroid for <method_name> on the given class node .