code: def apply_fixture_block_to_chain(
          block_fixture: Dict[str, Any],
          chain: BaseChain,
          perform_validation: bool=True) -> Tuple[BaseBlock, BaseBlock, BaseBlock]:
      
      # The block to import may be in a different block-class-range than the
      # chain's current one, so we use the block number specified in the
      # fixture to look up the correct block class.
      if 'blockHeader' in block_fixture:
          block_number = block_fixture['blockHeader']['number']
          block_class = chain.get_vm_class_for_block_number(block_number).get_block_class()
      else:
          block_class = chain.get_vm().get_block_class()
  
      block = rlp.decode(block_fixture['rlp'], sedes=block_class)
  
      mined_block, _, _ = chain.import_block(block, perform_validation=perform_validation)
  
      rlp_encoded_mined_block = rlp.encode(mined_block, sedes=block_class)
  
      return (block, mined_block, rlp_encoded_mined_block)
docs: :return: (premined_block, mined_block, rlp_encoded_mined_block)