code: def compute_blob_assignments(assignments):
      blob_assignments = {}
      for assignment in assignments:
          if len(assignment) == 1:
              continue
          last_blob, _ = assignment[-1]
          for blob, _ in assignment:
              blob_assignments[blob] = last_blob
      return blob_assignments
  
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 17 for calling a global function with example usage: compute_blob_assignments(assignments) and returns: blob_assignments