class_docstr: !
  @brief Package extractor provides servies to unpack pyclustering package.
class_docstr_tok: ["!","@","brief","Package","extractor","provides","servies","to","unpack","pyclustering","package","."]
code: def __unpack_data(self, pointer_package, pointer_data, type_package):
      if type_package == pyclustering_type_data.PYCLUSTERING_TYPE_CHAR:
          pointer_string = cast(pointer_data, c_char_p)
          return pointer_string.value
  
      elif (
          type_package
          == pyclustering_type_data.PYCLUSTERING_TYPE_WCHAR_T
      ):
          raise NotImplementedError(
              "Data type 'wchar_t' is not supported."
          )
  
      result = []
      append_element = lambda container, item: container.append(item)
  
      for index in range(0, pointer_package[0].size):
          if (
              type_package
              == pyclustering_type_data.PYCLUSTERING_TYPE_LIST
          ):
              pointer_package = cast(
                  pointer_data[index], (POINTER(pyclustering_package))
              )
              append_element(
                  result, self.__extract_data(pointer_package)
              )
  
          else:
              append_element(result, pointer_data[index])
  
      return result
  
imports: from ctypes import *
  import collections.abc
  import numpy
label_desc: Use image node_id 4 for calling the package_extractor obj's underlying member method code with example usage: obj.__unpack_data(pointer_package, pointer_data, type_package) and returns: result, pointer_string