code: def calculate_svd(data):
      
  
      if (not isinstance(data, np.ndarray)) or (data.ndim != 2):
          raise TypeError('Input data must be a 2D np.ndarray.')
  
      return svd(data, check_finite=False, lapack_driver='gesvd',
                 full_matrices=False)
docs: Calculate Singular Value Decomposition
  
      This method calculates the Singular Value Decomposition (SVD) of the input
      data using SciPy.
  
      Parameters
      ----------
      data : np.ndarray
          Input data array, 2D matrix
  
      Returns
      -------
      tuple of left singular vector, singular values and right singular vector
  
      Raises
      ------
      TypeError
          For invalid data type