code: def count_shared_blobs(proto):
      blobs = set()
      for op in proto.op:
          blobs = blobs.union(set(op.input)).union(set(op.output))
      return len([b for b in blobs if "_shared" in b])
  
file_path: pytorch/caffe2/python/models/imagenet_trainer_test_utils.py
imports: import numpy
  import time
  from caffe2.python import workspace, cnn, memonger, core
label_desc: Use image node_id 3 for calling a global function with example usage: count_shared_blobs(proto) and returns: len