code: def test_svd_interface_shape(shape, rank, nn):
      """Test that the SVD interface handles shape edge cases."""
      rng = tl.check_random_state(1234)
  
      X = tl.tensor(rng.random_sample(shape))
      X_mask = tl.zeros_like(X)
      X_mask = tl.index_update(X_mask, tl.index[1, 3], 1.0)
  
      U, S, V = svd_interface(
          X,
          n_eigenvecs=rank,
          non_negative=nn,
          mask=X_mask,
          n_iter_mask_imputation=3,
      )
      assert_(tl.all(S >= 0.0))
  
      if nn:
          assert_(tl.all(U >= 0.0))
          assert_(tl.all(V >= 0.0))
  
imports: import pytest
  from ...testing import assert_
  from ..svd import svd_interface
  import tensorly
  from ...testing import assert_
label_desc: Use image node_id 1 for calling a global function with example usage: test_svd_interface_shape(shape, rank, nn) without return types