def is_func_decorator(node):
 parent = node.parent
 while (parent is not None):
  if isinstance(parent, astroid.Decorators):
   return True
  if (parent.is_statement or isinstance(parent, astroid.Lambda) or isinstance(parent, (scoped_nodes.ComprehensionScope, scoped_nodes.ListComp))):
   break
  parent = parent.parent
 return False

def is_func_decorator ( node ) : parent = node . parent while ( parent is not None ) : if isinstance ( parent , astroid . Decorators ) : return True if ( parent . is_statement or isinstance ( parent , astroid . Lambda ) or isinstance ( parent , ( scoped_nodes . ComprehensionScope , scoped_nodes . ListComp ) ) ) : break parent = parent . parent return False
return true if the name is used in function decorator .