code: def test_blanczos_flags(compute_loadings, compute_scores, transpose):
      k, m, n = 10, 100, 200
      sigma = [spec1(i + 1, k) for i in range(m)]
      seed = 1025
      np.random.seed(seed)
      U = np.linalg.qr(np.random.normal(0, 1, (m, m)))[0]
      V = np.linalg.qr(np.random.normal(0, 1, (n, m)))[0]
      A = (U * sigma) @ V.T
      mt_A = matrix_table_from_numpy(A)
      mt_A_T = matrix_table_from_numpy(A.T)
      # compare absolute values to account for +-1 indeterminacy factor in singular vectors
      U = np.abs(U[:, :k])
      V = np.abs(V[:, :k])
      Usigma = U * sigma[:k]
      Vsigma = V * sigma[:k]
  
      mt = mt_A_T if transpose else mt_A
      eigenvalues, scores, loadings = hl._blanczos_pca(
          mt.ent,
          k=k,
          oversampling_param=k,
          q_iterations=4,
          compute_loadings=compute_loadings,
          compute_scores=compute_scores,
          transpose=transpose,
      )
      if compute_loadings:
          loadings = np.array(loadings.loadings.collect())
          np.testing.assert_allclose(np.abs(loadings), U, rtol=1e-02)
      else:
          assert loadings is None
      if compute_scores:
          scores = np.array(scores.scores.collect())
          np.testing.assert_allclose(np.abs(scores), Vsigma, rtol=1e-02)
      else:
          assert scores is None
      singulars = np.sqrt(eigenvalues)
      np.testing.assert_allclose(singulars, sigma[:k], rtol=1e-01)
  
imports: import math
  import pytest
  import numpy
  import hail
  from hail.methods.pca import _make_tsm
  from ..helpers import resource, fails_local_backend, skip_when_service_backend, test_timeout
label_desc: Use image node_id 6 for calling a global function with example usage: test_blanczos_flags(compute_loadings, compute_scores, transpose) without return types