def __eq__(self, other):
    if (isinstance(other, LabeledVector) and (self.labels != other.labels)):
        raise TypeError('Cannot compare due to mismatching `labels`')
    return super(LabeledVector, self).__eq__(other)
def __eq__(self, other):
    if (isinstance(other, LabeledVector) and (self.labels != other.labels)):
        raise TypeError('Cannot compare due to mismatching `labels`')
    return super(LabeledVector, self).__eq__(other)