@test_util.run_v1_only('b/120545219')
def testColocation(self):
    with ops.device('/job:ps'):
        var = variables.VariableV1(0, name='v')
    with ops.device('/job:worker/task:7'):
        assign_op = var.assign(1)
    self.assertDeviceEqual('/job:ps', assign_op.device)
    self.assertEqual([b'loc:@v'], assign_op.op.colocation_groups())
@test_util.run_v1_only('b/120545219')
def testColocation(self):
    with ops.device('/job:ps'):
        var = variables.VariableV1(0, name='v')
    with ops.device('/job:worker/task:7'):
        assign_op = var.assign(1)
    self.assertDeviceEqual('/job:ps', assign_op.device)
    self.assertEqual([b'loc:@v'], assign_op.op.colocation_groups())