code: def pop_assignment(stmnts, name):
      for i in range(len(stmnts)):
          stmnt = stmnts[i]
          if (
              isinstance(stmnt, _ast.Assign)
              and len(stmnt.targets) == 1
              and isinstance(stmnt.targets[0], _ast.Name)
              and isinstance(stmnt.targets[0].ctx, _ast.Store)
          ):
              if stmnt.targets[0].id == name:
                  stmnts.pop(i)
                  return stmnt.value
  
      return None
  
imports: from __future__ import print_function
  from __future__ import division
  from __future__ import absolute_import
  from ..decompiler.simple_instructions import SimpleInstructions
  from ..decompiler.control_flow_instructions import CtrlFlowInstructions
  import _ast
  from ..asttools import print_ast
  from ..utils import py3, py3op, py2op
label_desc: Use image node_id 2 for calling a global function with example usage: pop_assignment(stmnts, name) and returns: None, stmnt