code: def svd_flip(u, v, u_based_decision=True):
      """Sign correction to ensure deterministic output from SVD.
  
      Adjusts the columns of u and the rows of v such that the loadings in the
      columns in u that are largest in absolute value are always positive.
  
      Parameters
      ----------
      u, v : ndarray
          u and v are the output of `linalg.svd` or
          `sklearn.utils.extmath.randomized_svd`, with matching inner dimensions
          so one can compute `np.dot(u * s, v)`.
  
      u_based_decision : boolean, (default=True)
          If True, use the columns of u as the basis for sign flipping.
          Otherwise, use the rows of v. The choice of which variable to base the
          decision on is generally algorithm dependent.
  
  
      Returns
      -------
      u_adjusted, v_adjusted : arrays with the same dimensions as the input.
  
      """
      if u_based_decision:
          # columns of u, rows of v
          max_abs_cols = np.argmax(np.abs(u), axis=0)
          signs = np.sign(u[max_abs_cols, xrange(u.shape[1])])
          u *= signs
          v *= signs[:, np.newaxis]
      else:
          # rows of v, columns of u
          max_abs_rows = np.argmax(np.abs(v), axis=1)
          signs = np.sign(v[xrange(v.shape[0]), max_abs_rows])
          u *= signs
          v *= signs[:, np.newaxis]
      return u, v
  
imports: from __future__ import division
  from functools import partial
  import warnings
  import numpy
  from scipy import linalg
  from scipy.sparse import issparse, csr_matrix
  from .None import check_random_state
  from .fixes import np_version
  from ._logistic_sigmoid import _log_logistic_sigmoid
  from ..externals.six.moves import xrange
  from .sparsefuncs_fast import csr_row_norms
  from .validation import check_array
  from ..exceptions import NonBLASDotWarning
label_desc: Use image node_id 16 for calling a global function with example usage: svd_flip(u, v, u_based_decision) and returns: u,  v