def _predict_idx_shape_col(dtype, shape, name):
    """
    A helper method for predicting the data type and shape of a column indexing operation in pytables.
    :param dtype: The numpy datatype of the array or table.
    :param shape: The shape of the array or table.
    :param name: The name of the requested column.
    :return: A tuple, the first element is the numpy datatype of the requested column, the second element
        is the shape for the result of the column indexing operation.
    """
    if name not in dtype.fields:
        raise NameError("Specified column name '" + name + "' not in dataset.")
    coldtype = dtype[name]
    subdtype = coldtype.subdtype
    if subdtype is None:
        colshape = ()
    else:
        coldtype, colshape = subdtype
    new_shape = list(shape) + list(colshape)
    return coldtype, tuple(new_shape)