@classmethod
def dims(cls, value):
    """Produce iterable of all dimensions"""
    try:
        return value.__class__.__dimensions__
    except AttributeError as err:
        dimensions = []
        for base in cls.types(value):
            length = getattr(base, '_length_', None)
            if length is not None:
                dimensions.append(length)
        dimensions = tuple(dimensions)
        value.__class__.__dimensions__ = dimensions
        return dimensions
