parameters: (node, last_added=False)
return_statement: return result
docstring: For static analysis.
docstring_summary: For static analysis.
docstring_tokens: For static analysis .
function: def get_executable_nodes(node, last_added=False):
      """
      For static analysis.
      """
      result = []
      typ = node.type
      if typ == 'name':
          next_leaf = node.get_next_leaf()
          if last_added is False and node.parent.type != 'param' and next_leaf != '=':
              result.append(node)
      elif typ == 'expr_stmt':
          # I think evaluating the statement (and possibly returned arrays),
          # should be enough for static analysis.
          result.append(node)
          for child in node.children:
              result += get_executable_nodes(child, last_added=True)
      elif typ == 'decorator':
          # decorator
          if node.children[-2] == ')':
              node = node.children[-3]
              if node != '(':
                  result += get_executable_nodes(node)
      else:
          try:
              children = node.children
          except AttributeError:
              pass
          else:
              if node.type in _EXECUTE_NODES and not last_added:
                  result.append(node)
  
              for child in children:
                  result += get_executable_nodes(child, last_added)
  
      return result
function_tokens: def get_executable_nodes ( node , last_added = False ) : result = [ ] typ = node . type if typ == 'name' : next_leaf = node . get_next_leaf ( ) if last_added is False and node . parent . type != 'param' and next_leaf != '=' : result . append ( node ) elif typ == 'expr_stmt' : # I think evaluating the statement (and possibly returned arrays), # should be enough for static analysis. result . append ( node ) for child in node . children : result += get_executable_nodes ( child , last_added = True ) elif typ == 'decorator' : # decorator if node . children [ - 2 ] == ')' : node = node . children [ - 3 ] if node != '(' : result += get_executable_nodes ( node ) else : try : children = node . children except AttributeError : pass else : if node . type in _EXECUTE_NODES and not last_added : result . append ( node ) for child in children : result += get_executable_nodes ( child , last_added ) return result