code: def svd(
      matrix,
      compute_u=True,
      compute_v=False,
      algorithm="full",
      components=None,
  ):
      if algorithm not in ("full", "randomized"):
          raise ValueError(
              "`algorithm` must be one of ('full', 'randomized')."
          )
      x = convert_data(matrix)
      if len(x.shape) != 2:
          raise ValueError("Matrix must be square.")
      if components is None:
          components = min(*x.shape)
      if components <= 0 or components > min(*x.shape):
          raise ValueError(
              "`components` must be in range [1, min(matrix.height, matrix.width)]."
          )
      return PythonWrapper.singular_value_decomposition(
          *x.shape,
          *get_data(x),
          compute_u,
          compute_v,
          algorithm == "full",
          components,
      )
  
file_path: neoml/NeoML/Python/neoml/PCA.py
imports: import numpy
  from .Utils import convert_data, get_data
  from scipy.sparse import csr_matrix
  import neoml.PythonWrapper
label_desc: Use image node_id 1 for calling a global function with example usage: svd(matrix, compute_u, compute_v, algorithm, components) and returns: PythonWrapper