code: def _backfill_make_list_elem_type_block(block):
      # shallow copy hides changes on f.operations during the loop
      for op in block.operations:
          for b in op.blocks:
              _backfill_make_list_elem_type_block(b)
  
          if op.op_type != "tf_make_list":
              continue
  
          if op.outputs[0].elem_type != types.unknown:
              # elem_type of the list is known
              continue
  
          list_var = op.outputs[0]
          elem_type = _infer_elem_type(list_var)  # types.tensor
          if elem_type is None:
              msg = (
                  "No list_write or list_scatter op to infer make_list "
                  + "'{}' element type. Block:\n{}"
              )
              raise ValueError(msg.format(op.name, op.enclosing_block))
  
          # elem_shape can be runtime-detemrined, which cannot be inferred here at this point,
          # so we add an internal _const_symbolic node to cover both static and dynamic cases.
          elem_shape = [
              dim.name if is_symbolic(dim) else dim
              for dim in elem_type.get_shape()
          ]
          new_list = mb.make_list(
              init_length=op.init_length,
              dynamic_length=op.dynamic_length,
              elem_shape=tuple(elem_shape),
              dtype=op.inputs["dtype"],
              before_op=op,
              name=op.name,
          )
  
          block.replace_uses_of_var_after_op(
              anchor_op=op, old_var=op.outputs[0], new_var=new_list
          )
          block.remove_ops([op])
  
file_path: coremltools/coremltools/converters/mil/frontend/tensorflow/ssa_passes/backfill_make_list_elem_type.py
imports: from coremltools.converters.mil.mil import Builder
  from coremltools.converters.mil.mil import types
  from coremltools.converters.mil.mil.passes.graph_pass import AbstractGraphPass
  from coremltools.converters.mil.mil.passes.helper import block_context_manager
  from coremltools.converters.mil.mil.passes.pass_registry import register_pass
  from coremltools.converters.mil.mil.types.symbolic import is_symbolic
  from coremltools.converters.mil.mil.var import ListVar
label_desc: Use image node_id 1 for calling a global function with example usage: _backfill_make_list_elem_type_block(block) without return types