code: def filter_out_old_keys(self, state_dict, prefix, local_metadata):
      new_state_dict = {
          param_name: param_value
          for param_name, param_value in state_dict.items()
          if param_name not in self.old_to_new
      }
      return new_state_dict
  
file_path: opacus/opacus/layers/param_rename.py
imports: from typing import Dict, Union
  import torch.nn
  from torch import Tensor
  from torch.nn.modules.module import _IncompatibleKeys
label_desc: Use image node_id 1 for calling a global function with example usage: filter_out_old_keys(state_dict, prefix, local_metadata) and returns: new_state_dict