code: def randomized_range_finder(A, size, n_iter):
      """
      Computes an orthonormal matrix whose range
      approximates the range of A.
  
      Parameters
      ----------
      A: 2D array
          The input data matrix
  
      size: integer
          Size of the return array
  
      n_iter: integer
          Number of power iterations used to stabilize the result
  
      Returns
      -------
      Q: 2D array
          A (size x size) projection matrix, the range of which
          approximates well the range of the input matrix A.
  
      Notes
      -----
      scikit-learn implementation
      """
      # Generating normal random vectors with shape: (A.shape[1], size)
      Q = np.random.normal(size=(A.shape[1], size))
  
      # Perform power iterations with Q to further 'imprint' the top
      # singular vectors of A in Q
      for i in range(n_iter):
          Q, _ = linalg.lu(np.dot(A, Q), permute_l=True)
          Q, _ = linalg.lu(np.dot(A.T, Q), permute_l=True)
  
      # Sample the range of A using by linear projection of Q
      # Extract an orthonormal basis
      Q, _ = linalg.qr(np.dot(A, Q), mode="economic")
      return Q
  
imports: import numpy
  from scipy import linalg
label_desc: Use image node_id 2 for calling a global function with example usage: randomized_range_finder(A, size, n_iter) and returns: Q