code: def svd_subprojection(matrix, k):
      """
      Calculate svd of the matrix and produce a subprojection based on k
  
      Args:
          matrix : an input matrix
          k (int): desired rank of the output matrix
  
      Returns:
          two matrices representing the original matrix after svd and
          reducing them based on k.
      """
  
      import numpy as np
      from numpy import dot, diag
      from numpy.linalg import svd
  
      # Decompose W into (U, s, V)
      U, s, V = svd(matrix, full_matrices=False)
  
      # Create two dense layers from this; one that takes U, one that takes
      # dot(s, V), but restrict them all to rank k, such that the result is a
      # k-rank subprojection
      W1 = np.ascontiguousarray(U[:, :k])
      W2 = dot(diag(s[:k]), V[:k, :])
  
      return W1, W2
  
file_path: CNTK/bindings/python/cntk/contrib/netopt/factorization.py
imports: import cntk
  from cntk.ops.functions import BlockFunction
  from cntk.variables import Parameter
  from cntk.ops import times
  from cntk.internal import _as_tuple
  from cntk.layers.blocks import _initializer_for, _INFERRED, identity
  from cntk.layers.blocks import UntestedBranchError
  from cntk.default_options import is_default_override
  from cntk.default_options import get_default_override, default_override_or
label_desc: Use image node_id 1 for calling a global function with example usage: svd_subprojection(matrix, k) and returns: W1,  W2