code: def _get_count(assignments):
      """Return number of blobs in assignments"""
      if assignments:
          return sum([len(x) for x in assignments])
      return 0
  
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 21 for calling a global function with example usage: _get_count(assignments) and returns: int, sum