class_docstr: Returns number of time a name is used.
  
  +inf if it is use in a
  loop, if a variable used to compute it is modify before
  its last use or if it is use in a function call (as it is not an
  interprocedural analysis)
  
  >>> import gast as ast, sys
  >>> from pythran import passmanager, backend
  >>> code = "def foo(): c = 1; a = c + 2; c = 2; b = c + c + a; return b"
  >>> node = ast.parse(code)
  >>> pm = passmanager.PassManager("test")
  >>> res = pm.gather(LazynessAnalysis, node)
  >>> res['a'], res['b'], res['c']
  (inf, 1, 2)
  >>> code = '''
  ... def foo():
  ...     k = 2
  ...     for i in [1, 2]:
  ...         builtins.print(k)
  ...         k = i
  ...     builtins.print(k)'''
  >>> node = ast.parse(code)
  >>> res = pm.gather(LazynessAnalysis, node)
  >>> (res['i'], res['k']) == (sys.maxsize, 1)
  True
  >>> code = '''
  ... def foo():
  ...     k = 2
  ...     for i in [1, 2]:
  ...         builtins.print(k)
  ...         k = i
  ...         builtins.print(k)'''
  >>> node = ast.parse(code)
  >>> res = pm.gather(LazynessAnalysis, node)
  >>> (res['i'], res['k']) == (sys.maxsize, 2)
  True
  >>> code = '''
  ... def foo():
  ...     d = 0
  ...     for i in [0, 1]:
  ...         for j in [0, 1]:
  ...             k = 1
  ...             d += k * 2
  ...     return d'''
  >>> node = ast.parse(code)
  >>> res = pm.gather(LazynessAnalysis, node)
  >>> res['k']
  1
  >>> code = '''
  ... def foo():
  ...     k = 2
  ...     for i in [1, 2]:
  ...         builtins.print(k)'''
  >>> node = ast.parse(code)
  >>> res = pm.gather(LazynessAnalysis, node)
  >>> res['k'] == sys.maxsize
  True
  >>> code = '''
  ... def foo():
  ...     k = builtins.sum
  ...     builtins.print(k([1, 2]))'''
  >>> node = ast.parse(code)
  >>> res = pm.gather(LazynessAnalysis, node)
  >>> res['k']
  1
class_docstr_tok: ["Returns","number","of","time","a","name","is","used",".","+inf","if","it","is","use","in","a","loop",",","if","a","variable","used","to","compute","it","is","modify","before","its","last","use","or","if","it","is","use","in","a","function","call","(","as","it","is","not","an","interprocedural","analysis",")",">",">",">","import","gast","as","ast",",","sys",">",">",">","from","pythran","import","passmanager",",","backend",">",">",">","code","=","``","def","foo","(",")",":","c","=","1",";","a","=","c","+","2",";","c","=","2",";","b","=","c","+","c","+","a",";","return","b","''",">",">",">","node","=","ast.parse","(","code",")",">",">",">","pm","=","passmanager.PassManager","(","``","test","''",")",">",">",">","res","=","pm.gather","(","LazynessAnalysis",",","node",")",">",">",">","res","[","'","a","'","]",",","res","[","'","b","'","]",",","res","[","'","c","'","]","(","inf",",","1",",","2",")",">",">",">","code","=","``","'","...","def","foo","(",")",":","...","k","=","2","...","for","i","in","[","1",",","2","]",":","...","builtins.print","(","k",")","...","k","=","i","...","builtins.print","(","k",")","''","'",">",">",">","node","=","ast.parse","(","code",")",">",">",">","res","=","pm.gather","(","LazynessAnalysis",",","node",")",">",">",">","(","res","[","'","i","'","]",",","res","[","'","k","'","]",")","==","(","sys.maxsize",",","1",")","True",">",">",">","code","=","``","'","...","def","foo","(",")",":","...","k","=","2","...","for","i","in","[","1",",","2","]",":","...","builtins.print","(","k",")","...","k","=","i","...","builtins.print","(","k",")","''","'",">",">",">","node","=","ast.parse","(","code",")",">",">",">","res","=","pm.gather","(","LazynessAnalysis",",","node",")",">",">",">","(","res","[","'","i","'","]",",","res","[","'","k","'","]",")","==","(","sys.maxsize",",","2",")","True",">",">",">","code","=","``","'","...","def","foo","(",")",":","...","d","=","0","...","for","i","in","[","0",",","1","]",":","...","for","j","in","[","0",",","1","]",":","...","k","=","1","...","d","+=","k","*","2","...","return","d","''","'",">",">",">","node","=","ast.parse","(","code",")",">",">",">","res","=","pm.gather","(","LazynessAnalysis",",","node",")",">",">",">","res","[","'","k","'","]","1",">",">",">","code","=","``","'","...","def","foo","(",")",":","...","k","=","2","...","for","i","in","[","1",",","2","]",":","...","builtins.print","(","k",")","''","'",">",">",">","node","=","ast.parse","(","code",")",">",">",">","res","=","pm.gather","(","LazynessAnalysis",",","node",")",">",">",">","res","[","'","k","'","]","==","sys.maxsize","True",">",">",">","code","=","``","'","...","def","foo","(",")",":","...","k","=","builtins.sum","...","builtins.print","(","k","(","[","1",",","2","]",")",")","''","'",">",">",">","node","=","ast.parse","(","code",")",">",">",">","res","=","pm.gather","(","LazynessAnalysis",",","node",")",">",">",">","res","[","'","k","'","]","1"]
code: def modify(self, name):
      # if we modify a variable, all variables that needed it
      # to be compute are dead and its aliases too
      dead_vars = [
          var for var, deps in self.use.items() if name in deps
      ]
      self.dead.update(dead_vars)
      for var in dead_vars:
          dead_aliases = [
              alias.id
              for alias in self.name_to_nodes[var]
              if isinstance(alias, ast.Name)
          ]
          self.dead.update(dead_aliases)
  
imports: from pythran.analyses.aliases import Aliases
  from pythran.analyses.argument_effects import ArgumentEffects
  from pythran.analyses.identifiers import Identifiers
  from pythran.analyses.pure_expressions import PureExpressions
  from pythran.passmanager import FunctionAnalysis
  from pythran.syntax import PythranSyntaxError
  from pythran.utils import get_variable, isattr
  import pythran.metadata
  import pythran.openmp
  import gast
  import sys
label_desc: Use image node_id 2 for calling the LazynessAnalysis obj's underlying member method code with example usage: obj.modify(name) without return types