code: def get_tf_node_names(tf_nodes, mode="inputs"):
      """
      Inputs:
          - tf_nodes: list[str]. Names of target placeholders or output variable.
          - mode: str. When mode == inputs, do the stripe for the input names, for
                  instance 'placeholder:0' could become 'placeholder'.
                  when model == 'outputs', we keep the origin suffix number, like
                  'bn:0' will still be 'bn:0'.
      Return a list of names from given list of TensorFlow nodes. Tensor name's
      postfix is eliminated if there's no ambiguity. Otherwise, postfix is kept
      """
      if not isinstance(tf_nodes, list):
          tf_nodes = [tf_nodes]
      names = list()
      for n in tf_nodes:
          tensor_name = n if isinstance(n, six.string_types) else n.name
          if mode == "outputs":
              names.append(tensor_name)
              continue
          name = tensor_name.split(":")[0]
          if name in names:
              # keep postfix notation for multiple inputs/outputs
              names[names.index(name)] = (
                  name + ":" + str(names.count(name) - 1)
              )
              names.append(tensor_name)
          else:
              names.append(name)
      return names
  
file_path: turicreate/src/external/coremltools_wrap/coremltools/coremltools/converters/mil/frontend/tensorflow/test/testing_utils.py
imports: import six
  from coremltools import TensorType
  import pytest
  from coremltools.converters.mil.testing_utils import compare_shapes, compare_backend
  from coremltools.converters.mil.testing_reqs import converter
  from tensorflow.python.framework import dtypes
  import tempfile
  import os
  from tensorflow.python.tools.freeze_graph import freeze_graph
label_desc: Use image node_id 3 for calling a global function with example usage: get_tf_node_names(tf_nodes, mode) and returns: names