def __new__(cls, items=None):
    try:
        (labels, values) = zip(*items)
    except (ValueError, TypeError):
        (labels, values) = ((), ())
    if (not all((isinstance(i, Dimension) for i in labels))):
        raise ValueError(('All labels must be of type Dimension, got [%s]' % ','.join((i.__class__.__name__ for i in labels))))
    obj = super(LabeledVector, cls).__new__(cls, *values)
    obj.labels = labels
    return obj
def __new__(cls, items=None):
    try:
        (labels, values) = zip(*items)
    except (ValueError, TypeError):
        (labels, values) = ((), ())
    if (not all((isinstance(i, Dimension) for i in labels))):
        raise ValueError(('All labels must be of type Dimension, got [%s]' % ','.join((i.__class__.__name__ for i in labels))))
    obj = super(LabeledVector, cls).__new__(cls, *values)
    obj.labels = labels
    return obj