code: def test_api(backend_default, mocker):
      """Basic test for API breakage, not working as intended
      with `self.p = MyTensor(np.ones(10))`, but this could
      be due to invalid use of something."""
  
      class MyTensor(object):
          def __init__(self, arr):
              self.arr = arr
              self.shape = arr.shape
  
          def __add__(self, x):
              return MyTensor(self.get() + x.get())
  
          def __setitem__(self, index, value):
              self.arr[index] = value.get()
  
          def __getitem__(self, index):
              return self.arr[index]
  
          def get(self):
              return self.arr
  
      def my_get(self):
          return self
  
      def my_allocate(self, accumulate_updates=False):
          self.accumulate_updates = accumulate_updates
          self.p = MyTensor(np.zeros(10))
          self.acc_p = MyTensor(np.zeros(10))
          self.acc_params = [(self.acc_p, self.p)]
  
      @Layer.accumulates
      def my_bprop(self, err):
          pass
  
      layer = Layer()
  
      mocker.patch("neon.layers.layer.Layer.allocate", my_allocate)
      mocker.patch("neon.layers.layer.Layer.bprop", my_bprop)
  
      layer.allocate(accumulate_updates=True)
      layer.set_acc_on(True)
      layer.bprop(np.zeros(10))
      check_acc_on(layer, (10), ["p"])
  
imports: from utils import tensors_allclose, allclose_with_out
  import numpy
  import pytest
  from neon import NervanaObject
  from neon.initializers.initializer import Uniform
  from neon.layers.layer import Convolution, Deconvolution, Layer, Linear, Bias, BatchNorm
  from neon.layers.container import Sequential
label_desc: Use image node_id 9 for calling a global function with example usage: test_api(backend_default, mocker) and returns: self, MyTensor, self, self