code: def diff_states(dict_canonical, dict_subset):
      """
      **DEPRECATED - DO NOT USE**
      """
      names1, names2 = (
          list(dict_canonical.keys()),
          list(dict_subset.keys()),
      )
  
      # Sanity check that param names overlap
      # Note that params are not necessarily in the same order
      # for every pretrained model
      not_in_1 = [n for n in names1 if n not in names2]
      not_in_2 = [n for n in names2 if n not in names1]
      if len(not_in_1) != 0:
          raise AssertionError
      if len(not_in_2) != 0:
          raise AssertionError
  
      for name, v1 in dict_canonical.items():
          v2 = dict_subset[name]
          if not hasattr(v2, "size"):
              raise AssertionError
          if v1.size() != v2.size():
              yield (name, v1)
  
imports: from functools import partial
  from typing import Callable
  from torchvision.models.resnet import Bottleneck
  from .None import classification
  from .segmentation import *
  from .None import segmentation
  from enum import Enum
  from torchvision import models
  from torchvision.models.inception import InceptionAux
  import torch
  import torch.nn
  import os
  import errno
label_desc: Use image node_id 5 for calling a global function with example usage: diff_states(dict_canonical, dict_subset) without return types