code: def test_compute_norms_ndim1():
      from lasagne.utils import compute_norms
  
      # Test numpy versions of compute norms with axes
      array = np.random.randn(
          10,
      ).astype(theano.config.floatX)
  
      norms = compute_norms(array)
  
      assert array.dtype == norms.dtype
      assert norms.shape == array.shape
  
      # Check if they do not differ much
      assert np.allclose(norms, abs(array))
  
      # Test theano version of compute_norms
      t_array = theano.shared(array)
      t_norms = compute_norms(t_array)
  
      # Check if they do not differ much
      assert np.allclose(t_norms.eval(), norms)
  
imports: from mock import Mock
  import pytest
  import numpy
  import theano
  import theano.tensor
label_desc: Use image node_id 10 for calling a global function with example usage: test_compute_norms_ndim1() without return types