def retrieve_block(model_storage, weight_idx, block_x_idx, block_y_idx, block_size_x, block_size_y):
    """Retrieve a block with given weight_idx, block_x_idx, and block_y_idx

    Args:
        model_storage (model_storage): a model's model_storage 
        weight_idx (int): weight index
        block_x_idx (int): block index in x-axis
        block_y_idx (int): block index in y-axis
        block_size_x (int): block size in x-axis
        block_size_y (int): block size in y-axis
    
    Return:
        numpy array: a block

    """
    b = model_storage['weights_padded'][weight_idx][block_x_idx*block_size_x: (block_x_idx+1)*block_size_x,
                                                    block_y_idx*block_size_y: (block_y_idx+1)*block_size_y]
    return b