code: def _get_simple_assignments(tree):
      
      result = {}
      for node in ast.walk(tree):
          if isinstance(node, ast.Assign):
              for target in node.targets:
                  if isinstance(target, ast.Name):
                      result[target.id] = node.value
      return result
docs: Get simple assignments from node tree.