code: def random_bucket_assignment(
      costs: np.ndarray, num_buckets: int, max_iterations: int
  ) -> np.ndarray:
      best_indexes = naive_bucket_assignment(costs, num_buckets)
      best_cost = compute_bucket_imbalance_score(costs, best_indexes)
  
      for _ in range(max_iterations):
          new_indexes = np.random.permutation(best_indexes)
          new_cost = compute_bucket_imbalance_score(costs, new_indexes)
          if new_cost < best_cost:
              best_indexes = new_indexes
              best_cost = new_cost
  
      return best_indexes
  
imports: import numpy
label_desc: Use image node_id 3 for calling a global function with example usage: random_bucket_assignment(costs, num_buckets, max_iterations) and returns: best_indexes