code: def test_assignment_raises_error():
      def fun(A, b):
          A[1] = b
          return A
  
      A = npr.randn(5)
      with pytest.raises(TypeError):
          check_grads(fun)(A, 3.0)
  
imports: from __future__ import absolute_import
  import autograd.numpy
  import autograd.numpy.random
  from autograd.test_util import check_grads
  from autograd import grad
  import warnings
  import pytest
label_desc: Use image node_id 19 for calling a global function with example usage: test_assignment_raises_error() and returns: A