code: def add_missing_cmd(command_list):
      """Adds missing cmd tags to the given command list."""
      # E.g.: given:
      #   ['a', '0', '0', '0', '0', '0', '0', '0',
      #         '0', '0', '0', '0', '0', '0', '0']
      # Converts to:
      #   [['a', '0', '0', '0', '0', '0', '0', '0'],
      #    ['a', '0', '0', '0', '0', '0', '0', '0']]
      # And returns a string that joins these elements with spaces.
      cmd_tag = command_list[0]
      args = command_list[1:]
  
      final_cmds = []
      for arg_batch in grouper(args, NUM_ARGS[cmd_tag]):
          final_cmds.append([cmd_tag] + list(arg_batch))
  
      if not final_cmds:
          # command has no args (e.g.: 'z')
          final_cmds = [[cmd_tag]]
  
      return final_cmds
  
imports: import io
  import numpy
  from PIL import Image
  from six.moves import zip_longest
  from skimage import draw
  import tensorflow.compat.v1
label_desc: Use image node_id 7 for calling a global function with example usage: add_missing_cmd(command_list) and returns: final_cmds