code: def read_image(filename):
      """!
      @brief Returns image as N-dimension (depends on the input image) matrix, where one element of list describes pixel.
  
      @param[in] filename (string): Path to image.
  
      @return (list) Pixels where each pixel described by list of RGB-values.
  
      """
  
      with Image.open(filename) as image_source:
          data = [list(pixel) for pixel in image_source.getdata()]
          return data
  
imports: import time
  import numpy
  from numpy import array
  from PIL import Image
  import matplotlib.pyplot
  from sys import platform
  from pyclustering.utils.metric import distance_metric, type_metric
label_desc: Use image node_id 3 for calling a global function with example usage: read_image(filename) and returns: data