def overridden_method(klass, name):
 try:
  parent = next(klass.local_attr_ancestors(name))
 except (StopIteration, KeyError):
  return None
 try:
  meth_node = parent[name]
 except KeyError:
  return None
 if isinstance(meth_node, astroid.Function):
  return meth_node
 return None

def overridden_method ( klass , name ) : try : parent = next ( klass . local_attr_ancestors ( name ) ) except ( StopIteration , KeyError ) : return None try : meth_node = parent [ name ] except KeyError : return None if isinstance ( meth_node , astroid . Function ) : return meth_node return None
get overridden method if any .