docstr: Test for get_generating_ops and get_consuming_ops.
docstr_tok: ["Test","for","get_generating_ops","and","get_consuming_ops","."]
code: def test_get_generating_consuming(self):
      """Test for get_generating_ops and get_consuming_ops."""
      g0 = ops_lib.Graph()
      with g0.as_default():
          a0 = constant_op.constant(1)
          b0 = constant_op.constant(2)
          c0 = math_ops.add(a0, b0)
      self.assertEqual(len(op_selector.get_generating_ops([a0, b0])), 2)
      self.assertEqual(len(op_selector.get_consuming_ops([a0, b0])), 1)
      self.assertEqual(len(op_selector.get_generating_ops([c0])), 1)
      self.assertEqual(op_selector.get_consuming_ops([c0]), [])
  
file_path: tensorflow/tensorflow/python/ops/op_selector_test.py
imports: from tensorflow.python.framework import constant_op
  from tensorflow.python.framework import func_graph
  from tensorflow.python.framework import ops
  from tensorflow.python.ops import math_ops
  from tensorflow.python.ops import op_selector
  from tensorflow.python.platform import test
label_desc: Use image node_id 7 for calling the SelectTest obj's underlying member method code with example usage: obj.test_get_generating_consuming() without return types