code: def display_list_by_prefix(names_list, starting_spaces=0):
      """Creates a help string for names_list grouped by prefix."""
      cur_prefix, result_lines = None, []
      space = " " * starting_spaces
      for name in sorted(names_list):
          split = name.split("_", 1)
          prefix = split[0]
          if cur_prefix != prefix:
              result_lines.append(space + prefix + ":")
              cur_prefix = prefix
          result_lines.append(space + "  * " + name)
      return "\n".join(result_lines)
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import collections
  from tensor2tensor.utils import misc_utils
  import tensorflow.compat.v1
  from tensorflow.python.util import tf_inspect
label_desc: Use image node_id 14 for calling a global function with example usage: display_list_by_prefix(names_list, starting_spaces) and returns: str