def redefined_by_decorator(node):
 if node.decorators:
  for decorator in node.decorators.nodes:
   if (isinstance(decorator, astroid.Getattr) and (getattr(decorator.expr, 'name', None) == node.name)):
    return True
 return False

def redefined_by_decorator ( node ) : if node . decorators : for decorator in node . decorators . nodes : if ( isinstance ( decorator , astroid . Getattr ) and ( getattr ( decorator . expr , 'name' , None ) == node . name ) ) : return True return False
return true if the object is a method redefined via decorator .