code: def test_svd_flip_max_abs_cols(
      n_samples, n_features, global_random_seed
  ):
      rs = np.random.RandomState(global_random_seed)
      X = rs.randn(n_samples, n_features)
      U, _, Vt = linalg.svd(X, full_matrices=False)
  
      U1, _ = svd_flip(U, Vt, u_based_decision=True)
      max_abs_U1_row_idx_for_col = np.argmax(np.abs(U1), axis=0)
      assert (
          U1[max_abs_U1_row_idx_for_col, np.arange(U1.shape[1])] >= 0
      ).all()
  
      _, V2 = svd_flip(U, Vt, u_based_decision=False)
      max_abs_V2_col_idx_for_row = np.argmax(np.abs(V2), axis=1)
      assert (
          V2[np.arange(V2.shape[0]), max_abs_V2_col_idx_for_row] >= 0
      ).all()
  
imports: import numpy
  import pytest
  from scipy import linalg, sparse
  from scipy.linalg import eigh
  from scipy.sparse.linalg import eigsh
  from scipy.special import expit
  from sklearn.datasets import make_low_rank_matrix, make_sparse_spd_matrix
  from sklearn.utils import gen_batches
  from sklearn.utils._arpack import _init_arpack_v0
  from sklearn.utils._testing import assert_allclose, assert_allclose_dense_sparse, assert_almost_equal, assert_array_almost_equal, assert_array_equal, skip_if_32bit
  from sklearn.utils.extmath import _deterministic_vector_sign_flip, _incremental_mean_and_var, _randomized_eigsh, _safe_accumulator_op, cartesian, density, log_logistic, randomized_svd, row_norms, safe_sparse_dot, softmax, stable_cumsum, svd_flip, weighted_mode
  from sklearn.utils.fixes import COO_CONTAINERS, CSC_CONTAINERS, CSR_CONTAINERS, DOK_CONTAINERS, LIL_CONTAINERS, _mode
label_desc: Use image node_id 15 for calling a global function with example usage: test_svd_flip_max_abs_cols(n_samples, n_features, global_random_seed) without return types