code: def testSplitPipeline(self):
      with session.Session(
          target="",
          config=config_pb2.ConfigProto(device_count={"CPU": 2}),
      ) as sess:
          dataset = dataset_ops.Dataset.from_tensors(0)
  
          # Define a pipeline that attempts to use variables on two
          # different devices.
          #
          # Initialize the variables before creating to iterator, to avoid the
          # placement algorithm overriding the DT_RESOURCE colocation constraints.
          with ops.device("/cpu:0"):
              var_0 = resource_variable_ops.ResourceVariable(
                  initial_value=1
              )
          dataset = dataset.map(lambda x: x + var_0.read_value())
          sess.run(var_0.initializer)
  
          with ops.device("/cpu:1"):
              var_1 = resource_variable_ops.ResourceVariable(
                  initial_value=1
              )
          dataset = dataset.map(lambda x: x + var_1.read_value())
          sess.run(var_1.initializer)
  
          iterator = dataset_ops.make_initializable_iterator(dataset)
          sess.run(iterator.initializer)
  
          self.assertEqual(sess.run(iterator.get_next()), 2)
  
imports: import collections
  import dataclasses
  from absl.testing import parameterized
  import numpy
  from tensorflow.core.protobuf import config_pb2
  from tensorflow.python.client import session
  from tensorflow.python.data.experimental.ops import random_access
  from tensorflow.python.data.kernel_tests import checkpoint_test_base
  from tensorflow.python.data.kernel_tests import test_base
  from tensorflow.python.data.ops import dataset_ops
  from tensorflow.python.data.ops import options
  from tensorflow.python.data.util import nest
  from tensorflow.python.framework import combinations
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import errors
  from tensorflow.python.framework import ops
  from tensorflow.python.framework import sparse_tensor
  from tensorflow.python.framework import tensor_shape
  from tensorflow.python.ops import array_ops_stack
  from tensorflow.python.ops import math_ops
  from tensorflow.python.ops import resource_variable_ops
  from tensorflow.python.ops import tensor_array_ops
  from tensorflow.python.ops.ragged import ragged_factory_ops
  from tensorflow.python.platform import test
label_desc: Use image node_id 14 for calling the FromTensorsTest obj's underlying member method code with example usage: obj.testSplitPipeline() without return types