code: def initialize_medoids(sample, k, expected, ccore, **kwargs):
      data = read_sample(sample)
  
      data_type = kwargs.get("data_type", "points")
      metric = kwargs.get(
          "metric", distance_metric(type_metric.EUCLIDEAN_SQUARE)
      )
  
      if data_type == "distance_matrix":
          data = calculate_distance_matrix(data, metric)
  
      initial_medoids = build(data, k, ccore, **kwargs).initialize()
  
      assertion.eq(k, len(initial_medoids))
      if expected is not None:
          assertion.eq(expected, initial_medoids)
  
file_path: pyclustering/pyclustering/cluster/tests/kmedoids_templates.py
imports: import math
  import numpy
  from pyclustering.tests.assertion import assertion
  from pyclustering.cluster.kmedoids import kmedoids, build
  from pyclustering.cluster.center_initializer import kmeans_plusplus_initializer
  from pyclustering.samples import answer_reader
  from pyclustering.utils import read_sample, calculate_distance_matrix
  from pyclustering.utils.metric import distance_metric, type_metric
  from random import random, randint
label_desc: Use image node_id 8 for calling the kmedoids_test_template obj's underlying member method code with example usage: obj.initialize_medoids(sample, k, expected, ccore) without return types