def METHOD_NAME(self, other):
    if not self.stream and not other.stream:
        return False
    if self.ts > other.ts:
        return False
    if self.resource is not other.resource:
        return False
    if self.data.keys() != other.data.keys():
        return False
    for k, v in other.data:
        self.data[k] += v
    other._invalidate()
    return True