docstr: The PartitionedCall will be optimized to V2Add op in TF's internal optimization pass (see
  `_run_inline_graph_optimization`), so this test passes even when we haven't implemented
  the `PartitionedCall` op).
docstr_tok: ["The","PartitionedCall","will","be","optimized","to","V2Add","op","in","TF","'s","internal","optimization","pass","(","see","`","_run_inline_graph_optimization","`",")",",","so","this","test","passes","even","when","we","have","n't","implemented","the","`","PartitionedCall","`","op",")","."]
code: def test_partitioned_call_optimized_to_add_op(
      self, compute_unit, backend
  ):
      """
      The PartitionedCall will be optimized to V2Add op in TF's internal optimization pass (see
      `_run_inline_graph_optimization`), so this test passes even when we haven't implemented
      the `PartitionedCall` op).
      """
      x_shape = [2, 3]
      y_shape = [2, 3]
  
      @tf.function
      def simple_func(*args):
          output = [args[0] + args[1]]
          return output
  
      @make_tf_graph([x_shape, y_shape])
      def build_model(x, y):
          return tf.raw_ops.PartitionedCall(
              args=[x, y],
              f=simple_func.get_concrete_function(
                  tf.zeros(x_shape), tf.zeros(y_shape)
              ),
              Tout=[tf.float32],
          )
  
      model, inputs, outputs = build_model
  
      input_values = [
          np.zeros(x_shape).astype(np.float32),
          np.zeros(y_shape).astype(np.float32),
      ]
  
      input_dict = dict(zip(inputs, input_values))
  
      TensorFlowBaseTest.run_compare_tf(
          model,
          input_dict,
          outputs,
          compute_unit=compute_unit,
          backend=backend,
      )
  
imports: import itertools
  import numpy
  import pytest
  import coremltools
  from coremltools.converters.mil import testing_reqs
  from coremltools.converters.mil.frontend.tensorflow.test.testing_utils import TensorFlowBaseTest
  from coremltools.converters.mil.frontend.tensorflow2.test.testing_utils import TensorFlow2BaseTest
  from coremltools.converters.mil.frontend.tensorflow2.test.testing_utils import make_tf2_graph
  from coremltools.converters.mil.testing_utils import random_gen
label_desc: Use image node_id 1 for calling the TestPartitionedCall obj's underlying member method code with example usage: obj.test_partitioned_call_optimized_to_add_op(compute_unit, backend) and returns: output, tf