code: def test_struct(self):
      sdata = np.array(
          [
              (0.5, -1.3, 1, 100.11, 1111111),
              (2.5, -3.3, 2, 200.22, 2222222),
              (4.5, -5.3, 2, 350.33, 3333333),
              (6.5, -7.3, 0, 470.44, 4444444),
              (8.5, -9.3, 1, 270.55, 55555),
          ],
          dtype=[
              ("x", "f4"),
              ("y", "f4"),
              ("categ", "i4"),
              ("value", "f8"),
              ("super", "i8"),
          ],
      )
      hdata = np.array(
          [
              (0.5, -1.3, 1, 100.11, 1111111),
              (2.5, -3.3, 2, 200.22, 2222222),
              (4.5, -5.3, 2, 350.33, 3333333),
              (6.5, -7.3, 0, 470.44, 4444444),
              (8.5, -9.3, 1, 270.55, 55555),
          ],
          dtype=np.float64,
      )
      sr = d4p.cosine_distance().compute(sdata)
      hr = d4p.cosine_distance().compute(hdata)
      self.assertTrue(np.allclose(hr.cosineDistance, sr.cosineDistance))
  
imports: import unittest
  import numpy
  import daal4py
label_desc: Use image node_id 2 for calling the Test obj's underlying member method code with example usage: obj.test_struct() without return types