code: def draw(X, n_clusters, centers, pred, output):
      # Plot the samples and centroids of the fitted clusters into an image file.
      for i in range(n_clusters):
          labels = X[pred == i]
          plt.scatter(
              labels[:, 0], labels[:, 1], c=numpy.random.rand(3)
          )
      plt.scatter(
          centers[:, 0],
          centers[:, 1],
          s=120,
          marker="s",
          facecolors="y",
          edgecolors="k",
      )
      plt.savefig(output)
  
file_path: cupy/examples/kmeans/kmeans.py
imports: import argparse
  import contextlib
  import time
  import cupy
  import matplotlib.pyplot
  import numpy
label_desc: Use image node_id 4 for calling a global function with example usage: draw(X, n_clusters, centers, pred, output) without return types