code: def test_align_output_shape(
      self, space, aligner, base_point, permute_point
  ):
      expected = aligner.align(space, base_point, permute_point)
  
      is_multiple = (
          gs.ndim(base_point) > 2 and base_point.shape[0] > 1
      ) or (gs.ndim(permute_point) > 2 and permute_point.shape[0] > 1)
  
      out_ndim = gs.ndim(expected)
      if is_multiple:
          n_out = max(
              base_point.shape[0] if gs.ndim(base_point) > 2 else 1,
              permute_point.shape[0]
              if gs.ndim(permute_point) > 2
              else 1,
          )
          self.assertEqual(out_ndim, 3)
          self.assertEqual(expected.shape[0], n_out)
      else:
          self.assertEqual(out_ndim, 2)
  
imports: import networkx
  import pytest
  import geomstats.backend
  from geomstats.test.parametrizers import DataBasedParametrizer
  from geomstats.test.test_case import TestCase
  from geomstats.test_cases.geometry.stratified.point_set import PointSetMetricTestCase, PointSetTestCase, PointTestCase
  from .data.graph_space import AlignerTestData, DecoratorsTestData, GraphSpaceMetricTestData, GraphSpaceTestData, GraphTestData, PointToGeodesicAlignerTestData
label_desc: Use image node_id 4 for calling the TestAligner obj's underlying member method code with example usage: obj.test_align_output_shape(space, aligner, base_point, permute_point) without return types