class_docstr: !
  @brief Visualizer of EM algorithm's results.
  @details Provides services for visualization of particular features of the algorithm, for example,
            in case of two-dimensional dataset it shows covariance ellipses.
docstr: !
  @brief Draws clusters and in case of two-dimensional dataset draws their ellipses.
  @details Allocated figure by this method should be closed using `close()` method of this visualizer.
  
  @param[in] clusters (list): Clusters that were allocated by the algorithm.
  @param[in] sample (list): Dataset that were used for clustering.
  @param[in] covariances (list): Covariances of the clusters.
  @param[in] means (list): Means of the clusters.
  @param[in] figure (figure): If 'None' then new is figure is creater, otherwise specified figure is used
              for visualization.
  @param[in] display (bool): If 'True' then figure will be shown by the method, otherwise it should be
              shown manually using matplotlib function 'plt.show()'.
  
  @return (figure) Figure where clusters were drawn.
docstr_tok: ["!","@","brief","Draws","clusters","and","in","case","of","two-dimensional","dataset","draws","their","ellipses",".","@","details","Allocated","figure","by","this","method","should","be","closed","using","`","close","(",")","`","method","of","this","visualizer",".","@","param","[","in","]","clusters","(","list",")",":","Clusters","that","were","allocated","by","the","algorithm",".","@","param","[","in","]","sample","(","list",")",":","Dataset","that","were","used","for","clustering",".","@","param","[","in","]","covariances","(","list",")",":","Covariances","of","the","clusters",".","@","param","[","in","]","means","(","list",")",":","Means","of","the","clusters",".","@","param","[","in","]","figure","(","figure",")",":","If","'None","'","then","new","is","figure","is","creater",",","otherwise","specified","figure","is","used","for","visualization",".","@","param","[","in","]","display","(","bool",")",":","If","'True","'","then","figure","will","be","shown","by","the","method",",","otherwise","it","should","be","shown","manually","using","matplotlib","function","'plt.show","(",")","'",".","@","return","(","figure",")","Figure","where","clusters","were","drawn","."]
code: def show_clusters(
      clusters, sample, covariances, means, figure=None, display=True
  ):
      """!
      @brief Draws clusters and in case of two-dimensional dataset draws their ellipses.
      @details Allocated figure by this method should be closed using `close()` method of this visualizer.
  
      @param[in] clusters (list): Clusters that were allocated by the algorithm.
      @param[in] sample (list): Dataset that were used for clustering.
      @param[in] covariances (list): Covariances of the clusters.
      @param[in] means (list): Means of the clusters.
      @param[in] figure (figure): If 'None' then new is figure is creater, otherwise specified figure is used
                  for visualization.
      @param[in] display (bool): If 'True' then figure will be shown by the method, otherwise it should be
                  shown manually using matplotlib function 'plt.show()'.
  
      @return (figure) Figure where clusters were drawn.
  
      """
  
      visualizer = cluster_visualizer()
      visualizer.append_clusters(clusters, sample)
  
      if figure is None:
          figure = visualizer.show(display=False)
      else:
          visualizer.show(figure=figure, display=False)
  
      if len(sample[0]) == 2:
          ema_visualizer.__draw_ellipses(
              figure, visualizer, clusters, covariances, means
          )
  
      if display is True:
          plt.show()
  
      return figure
  
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 1 for calling the ema_visualizer obj's underlying member method code with example usage: obj.show_clusters(clusters, sample, covariances, means, figure, display) and returns: figure