class_docstr: Test the basic builder API.
class_docstr_tok: ["Test","the","basic","builder","API","."]
docstr: Test mb.program API
docstr_tok: ["Test","mb.program","API"]
code: def test_create_program(self):
      """
      Test mb.program API
      """
  
      @mb.program(input_specs=[mb.TensorSpec(shape=(2, 4))])
      def prog(x):
          return mb.add(x=x, y=0.0)
  
      assert isinstance(prog, Program)
      func = prog.functions["main"]
      assert len(func.operations) == 2  # add, const
      assert len(func.inputs) == 1
      assert len(func.outputs) == 1
  
imports: import numpy
  import pytest
  import coremltools
  from coremltools import _logger
  from coremltools.converters.mil.mil import Builder
  from coremltools.converters.mil.mil import Function, Program, types
  from coremltools.converters.mil.mil.passes.tests.test_passes import CONSTEXPR_FUNCS
label_desc: Use image node_id 2 for calling the TestMILBuilderAPI obj's underlying member method code with example usage: obj.test_create_program() and returns: mb