def program(
        input_specs: Optional[List[Placeholder]] = None,
        opset_version: Optional[AvailableTarget] = None,
        function_name: Optional[str] = "main",
    ):
        """
        The ``mb.program`` decorator creates a MIL program with a single
        function with name ``function_name``.

        Parameters
        ----------
        input_specs: List[TensorSpec]
            Describes the function inputs

        opset_version: AvailableTarget enum
            Describes the opset version of the program

        function_name: str
            Name of the function

        Examples
        --------
        >>> import coremltools as ct
        >>> from coremltools.converters.mil.mil import Builder as mb
        >>>
        >>> @mb.program(input_specs=[mb.TensorSpec(shape=(1,2))], opset_version=ct.target.iOS16)
        >>> def prog(a):
        >>>     return mb.add(x=a, y=2)

        """
        def wrapper(main_block):
            function = Builder._create_function(main_block, input_specs, opset_version)
            program = mil.Program()
            program.add_function(function_name, function)
            return program
        return wrapper

        The ``mb.program`` decorator creates a MIL program with a single
        function with name ``function_name``.

        Parameters
        ----------
        input_specs: List[TensorSpec]
            Describes the function inputs

        opset_version: AvailableTarget enum
            Describes the opset version of the program

        function_name: str
            Name of the function

        Examples
        --------
        >>> import coremltools as ct
        >>> from coremltools.converters.mil.mil import Builder as mb
        >>>
        >>> @mb.program(input_specs=[mb.TensorSpec(shape=(1,2))], opset_version=ct.target.iOS16)
        >>> def prog(a):
        >>>     return mb.add(x=a, y=2)

        
coremltools/converters/mil/mil/builder.py