code: def test_agg_ndarray_sum_with_transposes():
      transposes = hl.utils.range_table(4).annotate(
          x=hl.nd.arange(16).reshape((4, 4))
      )
      transposes = transposes.annotate(
          x=hl.if_else(
              (transposes.idx % 2) == 0, transposes.x, transposes.x.T
          )
      )
      np_arange_4_by_4 = np.arange(16).reshape((4, 4))
      transposes_result = (np_arange_4_by_4 * 2) + (
          np_arange_4_by_4.T * 2
      )
      assert np.array_equal(
          transposes.aggregate(hl.agg.ndarray_sum(transposes.x)),
          transposes_result,
      )
  
imports: import math
  import numpy
  import re
  from ..helpers import *
  import pytest
  from hail.utils.java import FatalError, HailUserError
label_desc: Use image node_id 48 for calling a global function with example usage: test_agg_ndarray_sum_with_transposes() without return types