class_docstr: Track side effects (list mutation, setattr, etc) that need to be
  applied after an FX graph is run.
class_docstr_tok: ["Track","side","effects","(","list","mutation",",","setattr",",","etc",")","that","need","to","be","applied","after","an","FX","graph","is","run","."]
code: def codegen_update_mutated(self, cg: PyCodegen):
      suffixes = []
      for var in self._get_modified_vars():
          if isinstance(var, variables.ListVariable):
              # old[:] = new
              cg(var, allow_cache=False)
              cg(var.mutable_local.source)
              cg.extend_output(
                  [
                      cg.create_load_const(None),
                      cg.create_load_const(None),
                      create_instruction("BUILD_SLICE", arg=2),
                  ]
              )
              suffixes.append([create_instruction("STORE_SUBSCR")])
          elif isinstance(var, variables.ConstDictVariable):
              cg.tx.output.update_co_names("clear")
              cg.tx.output.update_co_names("update")
  
              cg(var.mutable_local.source)
              cg.extend_output(
                  [create_instruction("LOAD_METHOD", argval="update")]
              )
              cg(var, allow_cache=False)
  
              cg(var.mutable_local.source)
              cg.extend_output(
                  [create_instruction("LOAD_METHOD", argval="clear")]
              )
  
              suffixes.append(
                  [
                      *create_call_method(0),  # clear
                      create_instruction("POP_TOP"),
                      *create_call_method(1),  # update
                      create_instruction("POP_TOP"),
                  ]
              )
          elif self.is_attribute_mutation(var):
              for name, value in self.store_attr_mutations.get(
                  var.mutable_local, {}
              ).items():
                  if isinstance(var, variables.NewGlobalVariable):
                      cg.tx.output.update_co_names(name)
                      cg(value)
                      suffixes.append(
                          [
                              create_instruction(
                                  "STORE_GLOBAL", argval=name
                              )
                          ]
                      )
                  elif name == "__call_nn_module_init":
                      pass  # handled in codegen_save_tempvars
                  elif isinstance(value, variables.DeletedVariable):
                      if isinstance(
                          var.mutable_local, AttributeMutationExisting
                      ) and hasattr(getattr(var, "value", None), name):
                          cg.tx.output.update_co_names(name)
                          cg(var.mutable_local.source)
                          suffixes.append(
                              [
                                  create_instruction(
                                      "DELETE_ATTR", argval=name
                                  )
                              ]
                          )
                  else:
                      cg.tx.output.update_co_names(name)
                      cg(value)
                      cg(var.mutable_local.source)
                      suffixes.append(
                          [
                              create_instruction(
                                  "STORE_ATTR", argval=name
                              )
                          ]
                      )
          elif isinstance(var, variables.TupleIteratorVariable):
              for _ in range(var.index):
                  cg.load_import_from(utils.__name__, "iter_next")
                  cg(var.mutable_local.source)
                  cg.extend_output(create_call_function(1, True))
                  cg.append_output(create_instruction("POP_TOP"))
          else:
              raise AssertionError(type(var))
  
      # do all the actual mutations at the very end to handle dependencies
      for suffix in reversed(suffixes):
          cg.extend_output(suffix)
  
imports: import inspect
  from typing import Any, Dict, List, Optional, Union
  import torch.nn
  from .None import utils, variables
  from .bytecode_transformation import create_call_function, create_call_method, create_instruction
  from .codegen import PyCodegen
  from .exc import unimplemented
  from .source import LocalSource, Source
  from .utils import nn_module_new, object_new
  from .variables.base import is_side_effect_safe, MutableLocalBase, MutableLocalSource, VariableTracker
label_desc: Use image node_id 33 for calling the SideEffects obj's underlying member method code with example usage: obj.codegen_update_mutated(cg) without return types