code: def _convert_to_gs_array(results, is_list):
      if is_list:
          resh_res = [
              [pt.to_array() for pt in pts_geo] for pts_geo in results
          ]
      else:
          resh_res = [pt.to_array() for pt in results]
  
      return gs.array(resh_res)
  
imports: from collections.abc import Iterable
  import geomstats.backend
  from geomstats.test.test_case import TestCase
label_desc: Use image node_id 1 for calling the PointSetMetricTestCase obj's underlying member method code with example usage: obj._convert_to_gs_array(results, is_list) and returns: gs