code: def promote_types(
      block_table, data_manager: DataManager, to_promote_blocks
  ):
      data_manager.promote_types(to_promote_blocks)
      to_promote_block_dict = dict(
          (bid, block_type) for bid, block_type in to_promote_blocks
      )
      block_table = block_table.mapValues(
          lambda blocks: [
              blocks[bid]
              if bid not in to_promote_block_dict
              else Block.get_block_by_type(
                  to_promote_block_dict[bid]
              ).convert_block(blocks[bid].tolist())
              for bid in range(len(blocks))
          ]
      )
  
      return block_table, data_manager
  
imports: import functools
  import torch
  from ..manager import DataManager
  from ..manager.block_manager import Block
  from typing import List, Tuple
label_desc: Use image node_id 1 for calling a global function with example usage: promote_types(block_table, data_manager, to_promote_blocks) and returns: block_table,  data_manager