code: def generate_new_color(existing_colors, pastel_factor=0.5):
      max_distance = None
      best_color = None
      for i in range(0, 100):
          color = get_random_color(pastel_factor=pastel_factor)
          if not existing_colors:
              return color
          best_distance = min(
              [color_distance(color, c) for c in existing_colors]
          )
          if not max_distance or best_distance > max_distance:
              max_distance = best_distance
              best_color = color
      return best_color
  
imports: import open3d
  import random
label_desc: Use image node_id 3 for calling a global function with example usage: generate_new_color(existing_colors, pastel_factor) and returns: best_color, color