code: def svd(nd, full_matrices=True, compute_uv=True):
      """Performs a singular value decomposition.
  
      Parameters
      ----------
      nd : :class:`.NDArrayNumericExpression`
          A 2 dimensional ndarray, shape(M, N).
      full_matrices: :class:`.bool`
          If True (default), u and vt have dimensions (M, M) and (N, N) respectively. Otherwise, they have dimensions
          (M, K) and (K, N), where K = min(M, N)
      compute_uv : :class:`.bool`
          If True (default), compute the singular vectors u and v. Otherwise, only return a single ndarray, s.
  
      Returns
      -------
      - u: :class:`.NDArrayNumericExpression`
          The left singular vectors.
      - s: :class:`.NDArrayNumericExpression`
          The singular values.
      - vt: :class:`.NDArrayNumericExpression`
          The right singular vectors.
      """
      float_nd = nd.map(lambda x: hl.float64(x))
      ir = NDArraySVD(float_nd._ir, full_matrices, compute_uv)
  
      return_type = (
          ttuple(
              tndarray(tfloat64, 2),
              tndarray(tfloat64, 1),
              tndarray(tfloat64, 2),
          )
          if compute_uv
          else tndarray(tfloat64, 1)
      )
      return construct_expr(
          ir, return_type, nd._indices, nd._aggregations
      )
  
imports: from functools import reduce
  import hail
  from hail.expr.functions import _ndarray
  from hail.expr.functions import array
  from hail.expr.types import HailType, tfloat64, tfloat32, ttuple, tndarray
  from hail.typecheck import typecheck, nullable, oneof, tupleof, sequenceof
  from hail.expr.expressions import expr_int32, expr_int64, expr_tuple, expr_any, expr_array, expr_ndarray, expr_numeric, Int64Expression, cast_expr, construct_expr, expr_bool, unify_all
  from hail.expr.expressions.typed_expressions import NDArrayNumericExpression
  from hail.ir import NDArrayQR, NDArrayInv, NDArrayConcat, NDArraySVD, NDArrayEigh, Apply
label_desc: Use image node_id 12 for calling a global function with example usage: svd(nd, full_matrices, compute_uv) and returns: construct_expr