class_docstr: Test the basic builder API.
class_docstr_tok: ["Test","the","basic","builder","API","."]
docstr: If ``function_name`` is not provide, mb.program creates function with name "main" by default.
docstr_tok: ["If","``","function_name","``","is","not","provide",",","mb.program","creates","function","with","name","``","main","''","by","default","."]
code: def test_create_program_function_name(self):
      """
      If ``function_name`` is not provide, mb.program creates function with name "main" by default.
      """
  
      # defaults to "main"
      @mb.program(input_specs=[mb.TensorSpec(shape=(2, 4))])
      def prog(x0):
          return x0
  
      assert len(prog.functions) == 1
      assert "main" in prog.functions
  
      # user can also provide function_name
      @mb.program(
          input_specs=[mb.TensorSpec(shape=(2, 4))],
          function_name="good_function",
      )
      def prog(x0):
          return x0
  
      assert len(prog.functions) == 1
      assert "good_function" in prog.functions
  
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 3 for calling the TestMILBuilderAPI obj's underlying member method code with example usage: obj.test_create_program_function_name() and returns: x0, x0