code: def _sanity_check_fold_scope_locations_are_unique(ir_blocks):
      
      observed_locations = dict()
      for block in ir_blocks:
          if isinstance(block, Fold):
              alternate = observed_locations.get(block.fold_scope_location, None)
              if alternate is not None:
                  raise AssertionError(u'Found two Fold blocks with identical FoldScopeLocations: '
                                       u'{} {} {}'.format(alternate, block, ir_blocks))
              observed_locations[block.fold_scope_location] = block
docs: Assert that every FoldScopeLocation that exists on a Fold block is unique.