code: def _check_no_output_connection(
      block: Block, ops: List[Operation]
  ) -> bool:
      """
      Check that none of the op in this pattern is connected to the output
      (except the last op)
  
      :param block: Block
      :param ops: List of operations to check on.
      """
      for op in ops[:-1]:
          for out in op.outputs:
              if out in block.outputs:
                  return False
      return True
  
file_path: coremltools/coremltools/converters/mil/mil/passes/helper.py
imports: from typing import List
  import numpy
  from coremltools.converters.mil.mil import Block, Operation
  from coremltools.converters.mil.mil.passes.graph_pass import AbstractGraphPass
label_desc: Use image node_id 3 for calling a global function with example usage: _check_no_output_connection(block, ops) and returns: True, False