def id_wo_prefix(block_id):
  """Shorten a block id by removing the main_inst. prefix if present.
  """
  return block_id[len('main_inst.'):] if block_id.startswith('main_inst.') \
         else block_id