def _determine_function_name_type(node):
 if (not node.is_method()):
  return 'function'
 if node.decorators:
  decorators = node.decorators.nodes
 else:
  decorators = []
 for decorator in decorators:
  if (isinstance(decorator, astroid.Name) or (isinstance(decorator, astroid.Getattr) and (decorator.attrname == 'abstractproperty'))):
   infered = safe_infer(decorator)
   if (infered and (infered.qname() in PROPERTY_CLASSES)):
    return 'attr'
  elif (isinstance(decorator, astroid.Getattr) and (decorator.attrname in ('setter', 'deleter'))):
   return 'attr'
 return 'method'

def _determine_function_name_type ( node ) : if ( not node . is_method ( ) ) : return 'function' if node . decorators : decorators = node . decorators . nodes else : decorators = [ ] for decorator in decorators : if ( isinstance ( decorator , astroid . Name ) or ( isinstance ( decorator , astroid . Getattr ) and ( decorator . attrname == 'abstractproperty' ) ) ) : infered = safe_infer ( decorator ) if ( infered and ( infered . qname ( ) in PROPERTY_CLASSES ) ) : return 'attr' elif ( isinstance ( decorator , astroid . Getattr ) and ( decorator . attrname in ( 'setter' , 'deleter' ) ) ) : return 'attr' return 'method'
determine the name type whose regex the a functions name should match .