code: def get_dataset_from_tensor_slices(inp_array):
      dataset = dataset_ops.DatasetV2.from_tensor_slices(inp_array)
      # TODO(b/138326910): Remove Dataset V1 version once bug resolved.
      if not tf2.enabled():
          dataset = dataset_ops.Dataset.from_tensor_slices(inp_array)
      return dataset
  
imports: from absl.testing import parameterized
  from tensorflow.python import tf2
  from tensorflow.python.data.ops import dataset_ops
  from tensorflow.python.distribute import combinations
  from tensorflow.python.distribute import strategy_combinations
  from tensorflow.python.eager import backprop
  from tensorflow.python.eager import def_function
  from tensorflow.python.eager import test
  from tensorflow.python.ops import math_ops
  from tensorflow.python.ops import variables
label_desc: Use image node_id 1 for calling a global function with example usage: get_dataset_from_tensor_slices(inp_array) and returns: dataset