code: def test_svd_flip_sign(dtype, u_based):
      try:
          x = np.array(
              [
                  [1, -1, 1, -1],
                  [1, -1, 1, -1],
                  [-1, 1, 1, -1],
                  [-1, 1, 1, -1],
              ],
              dtype=dtype,
          )
      except TypeError:
          pytest.skip("128-bit floats not supported by NumPy")
      u, v = svd_flip(x, x.T, u_based_decision=u_based)
      assert u.dtype == x.dtype
      assert v.dtype == x.dtype
      # Verify that all singular vectors have same
      # sign except for the last one (i.e. last column)
      y = x.copy()
      y[:, -1] *= y.dtype.type(-1)
      assert_eq(u, y)
      assert_eq(v, y.T)
  
imports: from __future__ import annotations
  import sys
  import pytest
  import numpy
  import scipy.linalg
  from packaging.version import parse
  import dask.array
  from dask.array.linalg import qr, sfqr, svd, svd_compressed, tsqr
  from dask.array.numpy_compat import _np_version
  from dask.array.utils import assert_eq, same_keys, svd_flip
label_desc: Use image node_id 32 for calling a global function with example usage: test_svd_flip_sign(dtype, u_based) without return types