docstr: Input graph:
  x -> sin ---> sub -> output_1
            |
            v
           mul -> tan -> output_2
           
  If x has symbolic shape, then the subgraph mil -> tan should also have symbolic shape
docstr_tok: ["Input","graph",":","x","-",">","sin","--","-",">","sub","-",">","output_1","|","v","mul","-",">","tan","-",">","output_2","If","x","has","symbolic","shape",",","then","the","subgraph","mil","-",">","tan","should","also","have","symbolic","shape"]
code: def test_extract_submodel_symbolic_input(self):
      """
      Input graph:
      x -> sin ---> sub -> output_1
                |
                v
               mul -> tan -> output_2
  
      If x has symbolic shape, then the subgraph mil -> tan should also have symbolic shape
      """
  
      @mb.program(
          input_specs=[mb.TensorSpec(shape=(1, get_new_symbol()))]
      )
      def prog(x):
          sin = mb.sin(x=x, name="sin")
          sub = mb.sub(x=sin, y=1.5, name="sub")
          mul = mb.mul(x=sin, y=1.2, name="mul")
          tan = mb.tan(x=mul, name="tan")
          return sub, tan
  
      model = ct.convert(prog, convert_to="neuralnetwork")
      submodel = extract_submodel(
          model, outputs=["tan"], inputs=["mul"]
      )
      func = submodel._mil_program.functions["main"]
  
      input = list(func.inputs.values())[0]
      assert input.shape[0] == 1
      assert is_symbolic(input.shape[1])
  
      output = func.outputs[0]
      assert output.shape[0] == 1
      assert is_symbolic(output.shape[1])
  
file_path: coremltools/coremltools/converters/mil/mil/tests/test_debug.py
imports: import itertools
  import os
  import tempfile
  import pytest
  import numpy
  import coremltools
  from coremltools.converters.mil import Builder
  from coremltools.converters.mil.debugging_utils import extract_submodel
  from coremltools.converters.mil.mil import get_new_symbol
  from coremltools.converters.mil.mil.types.symbolic import is_symbolic
  from coremltools.converters.mil.testing_utils import get_op_types_in_program
label_desc: Use image node_id 2 for calling the TestExtractSubModel obj's underlying member method code with example usage: obj.test_extract_submodel_symbolic_input() and returns: sub,  tan