code: def test_isinstance():
      def checker(ex, type_, truthval):
          assert isinstance(ex, type_) == truthval
          return 1.0
  
      examples = [
          [list, [[]], [()]],
          [np.ndarray, [np.zeros(1)], [[]]],
          [(tuple, list), [[], ()], [np.zeros(1)]],
      ]
  
      for type_, positive_examples, negative_examples in examples:
          for ex in positive_examples:
              checker(ex, type_, True)
              grad(checker)(ex, type_, True)
  
          for ex in negative_examples:
              checker(ex, type_, False)
              grad(checker)(ex, type_, False)
  
imports: import autograd.numpy
  from autograd import grad
  from autograd.builtins import isinstance
label_desc: Use image node_id 1 for calling a global function with example usage: test_isinstance() and returns: int