code: def tf_lstm_to_core_lstm_block(block):
      # shallow copy hides changes on f.operations during the loop
      for op in block.operations[:]:
          for b in op.blocks:
              tf_lstm_to_core_lstm_block(b)
  
          if op.op_type in ["tf_lstm_block_cell", "tf_lstm_block"]:
              if try_replace_with_core_lstm(op):
                  logging.info(
                      "Successfully map {} to lstm".format(op.op_type)
                  )
              else:
                  logging.info(
                      "Unable to map {} to lstm".format(op.op_type)
                  )
  
file_path: turicreate/src/external/coremltools_wrap/coremltools/coremltools/converters/mil/frontend/tensorflow/ssa_passes/tf_lstm_to_core_lstm.py
imports: from __future__ import print_function
  from __future__ import division
  from __future__ import absolute_import
  from coremltools.converters.mil.mil.passes.pass_registry import register_pass
  from coremltools.converters.mil.mil import Builder
  from coremltools.converters.mil.mil import types
  import numpy
  import logging
label_desc: Use image node_id 2 for calling a global function with example usage: tf_lstm_to_core_lstm_block(block) without return types