def __mul__(self, other):
        if isinstance(other, Vector):
            out, i, j, u, v = 0, 0, 0, self.value, other.value
            try:
                while True:
                    if u[i][0] < v[j][0]:
                        i += 1
                    elif u[i][0] > v[j][0]:
                        j += 1
                    else:
                        i, j = i+1, j+1
                        out += u[i][1]*v[j][1]
            except __HOLE__:
                return out
        else:
            return Vector(tuple((k,v*other) for (k,v) in self.value))
dataset/ETHPy150Open mollyproject/mollyproject/molly/wurfl/vsm.py/Vector.__mul__