def get_ext_info(hdu):
    """
    Returns name, type and size of a specified HDU extension

    :param hdu: a single extension of a multiextension HDU item
    :type hdu: astropy.io.fits.hdu.image class
    :return: 3- element dictionary with text values for extension name, extension type, and extension size.
    """
    outDict = {}
    outDict['name'] = hdu.name
    outDict['type'] = str(hdu).split(' object')[0].split('.')[-1]
    if outDict['type'] == 'ImageHDU' and hdu.shape:
        outDict['size'] = '{} x {}'.format(hdu.shape[0], hdu.shape[1])
    elif 'table' in outDict['type'].lower():
        nRows = len(hdu.data)
        nCols = len(hdu.data[0])
        outDict['size'] = '{}R x {}C'.format(nRows, nCols)
    else:
        outDict['size'] = '()'
    return outDict
