class_docstr: !
  @brief Provides services for preparing initial means and covariances for Expectation-Maximization algorithm.
  @details Initialization strategy is defined by enumerator 'ema_init_type': random initialization and 
            kmeans with kmeans++ initialization. Here an example of initialization using kmeans strategy:
  
  @code
      from pyclustering.utils import read_sample
      from pyclustering.samples.definitions import FAMOUS_SAMPLES
      from pyclustering.cluster.ema import ema_initializer
  
      sample = read_sample(FAMOUS_SAMPLES.SAMPLE_OLD_FAITHFUL)
      amount_clusters = 2
  
      initial_means, initial_covariance = ema_initializer(sample, amount_clusters).initialize()
      print(initial_means)
      print(initial_covariance)
  @endcode
docstr: !
  @brief Calculate Euclidean distance to each point from the each cluster. 
  @brief Nearest points are captured by according clusters and as a result clusters are updated.
  
  @return (list) updated clusters as list of clusters. Each cluster contains indexes of objects from data.
docstr_tok: ["!","@","brief","Calculate","Euclidean","distance","to","each","point","from","the","each","cluster",".","@","brief","Nearest","points","are","captured","by","according","clusters","and","as","a","result","clusters","are","updated",".","@","return","(","list",")","updated","clusters","as","list","of","clusters",".","Each","cluster","contains","indexes","of","objects","from","data","."]
code: def __calculate_initial_clusters(self, centers):
      """!
      @brief Calculate Euclidean distance to each point from the each cluster.
      @brief Nearest points are captured by according clusters and as a result clusters are updated.
  
      @return (list) updated clusters as list of clusters. Each cluster contains indexes of objects from data.
  
      """
  
      clusters = [[] for _ in range(len(centers))]
      for index_point in range(len(self.__sample)):
          index_optim, dist_optim = -1, 0.0
  
          for index in range(len(centers)):
              dist = euclidean_distance_square(
                  self.__sample[index_point], centers[index]
              )
  
              if (dist < dist_optim) or (index == 0):
                  index_optim, dist_optim = index, dist
  
          clusters[index_optim].append(index_point)
  
      return clusters
  
imports: import numpy
  import random
  from pyclustering.cluster import cluster_visualizer
  from pyclustering.cluster.center_initializer import kmeans_plusplus_initializer
  from pyclustering.cluster.kmeans import kmeans
  from pyclustering.utils import pi, calculate_ellipse_description, euclidean_distance_square
  from enum import IntEnum
  import matplotlib.pyplot
  import matplotlib.animation
  from matplotlib import patches
label_desc: Use image node_id 3 for calling the ema_initializer obj's underlying member method code with example usage: obj.__calculate_initial_clusters(centers) and returns: clusters