code: def _repeated_svd(x, lwork, overwrite_a=False):
      """Mimic scipy.linalg.svd, avoid lwork and get_lapack_funcs overhead."""
      gesdd, gesvd = _get_lapack_funcs(x.dtype, ("gesdd", "gesvd"))
      # this has to use overwrite_a=False in case we need to fall back to gesvd
      u, s, v, info = gesdd(
          x,
          compute_uv=True,
          lwork=lwork[0],
          full_matrices=False,
          overwrite_a=False,
      )
      if info > 0:
          # Fall back to slower gesvd, sometimes gesdd fails
          u, s, v, info = gesvd(
              x,
              compute_uv=True,
              lwork=lwork[1],
              full_matrices=False,
              overwrite_a=overwrite_a,
          )
      if info > 0:
          raise np.linalg.LinAlgError("SVD did not converge")
      if info < 0:
          raise ValueError(
              "illegal value in %d-th argument of internal gesdd"
              % -info
          )
      return u, s, v
  
file_path: mne-python/mne/utils/linalg.py
imports: import functools
  import numpy
  from scipy import linalg
  from scipy._lib._util import _asarray_validated
label_desc: Use image node_id 4 for calling a global function with example usage: _repeated_svd(x, lwork, overwrite_a) and returns: u,  s,  v