code: def makeUniqueGroupName(name, groupNames, counter=0):
      # Add a number to the name if the counter is higher than zero.
      newName = name
      if counter > 0:
          newName = "%s%d" % (newName, counter)
      # If the new name is in the existing group names, recurse.
      if newName in groupNames:
          return makeUniqueGroupName(name, groupNames, counter + 1)
      # Otherwise send back the new name.
      return newName
  
label_desc: Use image node_id 3 for calling a global function with example usage: makeUniqueGroupName(name, groupNames, counter) and returns: newName, makeUniqueGroupName