'Summarize the HDU: name, dimensions, and formats.'

def _summary(self):

    class_name = self.__class__.__name__
    if self._data_loaded:
        if (self.data is None):
            format = ''
        else:
            format = self.data.dtype.name
            format = format[(format.rfind('.') + 1):]
    else:
        if (self.shape and all(self.shape)):
            format = BITPIX2DTYPE[self._bitpix]
        else:
            format = ''
        if (format and (not self._do_not_scale_image_data) and ((self._orig_bscale != 1) or (self._orig_bzero != 0))):
            new_dtype = self._dtype_for_bitpix()
            if (new_dtype is not None):
                format += '    (rescales    to    {0})'.format(new_dtype.name)
    shape = tuple(reversed(self.shape))
    return (self.name, self.ver, class_name, len(self._header), shape, format, '')
