code: def check_acc_on(layer, out_shape, buffers):
      # generate two random delta tensors
      err1 = errfn(layer, out_shape)
      err2 = errfn(layer, out_shape)
      assert not (tensors_allclose(err1, err2, atol=0.0, rtol=0.0))
      terminal_layer = layer.get_terminal()
  
      for b in buffers:
          # check that we have created the acc buffer
          assert (
              getattr(terminal_layer, b).get().shape
              == getattr(terminal_layer, "acc_" + b).get().shape
          )
  
          layer.bprop(err1)
          dW_s = getattr(terminal_layer, b).get()
  
          layer.bprop(err2)
          dW = getattr(terminal_layer, b).get()
  
          # Turning acc_on on should accumulate
          layer.set_acc_on(True)
  
          # test we created the buffer
          assert hasattr(terminal_layer, "acc_" + b)
  
          layer.bprop(err1)
          dW_p = getattr(terminal_layer, b).get()
  
          assert allclose_with_out(dW_p, (dW + dW_s))
  
          # Turning acc_on off should reset on next bprop
          layer.set_acc_on(False)
  
          layer.bprop(err2)
          dW_dp = getattr(terminal_layer, b).get()
  
          assert allclose_with_out(dW_dp, dW)
  
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 6 for calling a global function with example usage: check_acc_on(layer, out_shape, buffers) without return types