code: def sort_rgb_array_2(arr):
      rgb = {"R": 0, "G": 0, "B": 0}
  
      # count colors
      for c in arr:
          rgb[c] += 1
  
      # adjust the intervals
      rgb["G"] += rgb["R"]
      rgb["B"] += rgb["G"]
  
      # assign colors
      for i in range(len(arr)):
          if i < rgb["R"]:
              arr[i] = "R"
          elif i < rgb["G"]:
              arr[i] = "G"
          else:
              arr[i] = "B"
  
      return arr
  
label_desc: Use image node_id 3 for calling a global function with example usage: sort_rgb_array_2(arr) and returns: arr