code: def generate_clustered_data(
      seed=0,
      n_clusters=3,
      n_features=2,
      n_samples_per_cluster=20,
      std=0.4,
  ):
      prng = np.random.RandomState(seed)
  
      # the data is voluntary shifted away from zero to check clustering
      # algorithm robustness with regards to non centered data
      means = (
          np.array(
              [
                  [1, 1, 1, 0],
                  [-1, -1, 0, 1],
                  [1, -1, 1, 1],
                  [-1, 1, 1, 0],
              ]
          )
          + 10
      )
  
      X = np.empty((0, n_features))
      for i in range(n_clusters):
          X = np.r_[
              X,
              means[i][:n_features]
              + std * prng.randn(n_samples_per_cluster, n_features),
          ]
      return X
  
label_desc: Use image node_id 1 for calling a global function with example usage: generate_clustered_data(seed, n_clusters, n_features, n_samples_per_cluster, std) and returns: X