code: def verify_inplace_blobs(net_a, net_b):
      """
      Verifies that net_a and net_b have the same in-place blob assignments.
      Particularly, that memonger did not add an in-place assignment when that
      did not exist before.
      """
  
      def get_inplaces(op):
          out = list(op.output)
          inplaces = []
          for j, inp in enumerate(op.input):
              if inp in out:
                  inplaces.append([j, out.index(inp)])
          return inplaces
  
      for op_a, op_b in zip(net_a.op, net_b.op):
          if op_a.type != op_b.type:
              return False
          if get_inplaces(op_a) != get_inplaces(op_b):
              return False
      return True
  
imports: import networkx
  import collections
  import time
  import copy
  from caffe2.python import workspace, core
  from caffe2.proto import caffe2_pb2
  import enum
  import logging
  import caffe2.python._import_c_extension
label_desc: Use image node_id 31 for calling a global function with example usage: verify_inplace_blobs(net_a, net_b) and returns: True, inplaces, False, False