code: def fullrank(x, r=None):
      """
      Return an array whose column span is the same as x.
  
      Parameters
      ----------
      x : ndarray
          The array to adjust, 2d.
      r : int, optional
          The rank of x. If not provided, determined by `np.linalg.matrix_rank`.
  
      Returns
      -------
      ndarray
          The array adjusted to have full rank.
  
      Notes
      -----
      If the rank of x is known it can be specified as r -- no check
      is made to ensure that this really is the rank of x.
      """
      if r is None:
          r = np.linalg.matrix_rank(x)
  
      v, d, u = np.linalg.svd(x, full_matrices=False)
      order = np.argsort(d)
      order = order[::-1]
      value = []
      for i in range(r):
          value.append(v[:, order[i]])
      return np.asarray(np.transpose(value)).astype(np.float64)
  
imports: import numpy
  import pandas
  import scipy.linalg
  from statsmodels.tools.data import _is_using_pandas
  from statsmodels.tools.validation import array_like
label_desc: Use image node_id 11 for calling a global function with example usage: fullrank(x, r) and returns: np