code: def test_hist(nbin_offset_dim_dtype_inp, backend_pair):
      """
      Compare the nervanagpu and nervanacpu hist implementation to the reference
      implementation above.
  
      Parameterized test case, uses pytest_generate_test to enumerate dim_dtype_inp
      tuples that drive the test.
      """
  
      (
          (nbins, offset),
          dim,
          dtype,
          (name, inp_gen),
      ) = nbin_offset_dim_dtype_inp
  
      gpuflag = check_gpu.get_compute_capability(0) >= 3.0
      if gpuflag is False:
          raise RuntimeError(
              "Device does not have CUDA compute capability 3.0 or greater"
          )
  
      ng, nc = backend_pair
      ng.set_hist_buffers(nbins, offset)
      nc.set_hist_buffers(nbins, offset)
  
      np_inp = inp_gen(dim).astype(dtype)
      np_hist = ref_hist(np_inp, nbins=nbins, offset=offset)
      for be in [ng, nc]:
          be_inp = be.array(np_inp, dtype=dtype)
          be_hist = be_inp.hist(name)
          assert tensors_allclose(np_hist, be_hist)
  
file_path: neon/tests/test_backend_hist.py
imports: from builtins import str
  import numpy
  import itertools
  import pytest
  from neon.backends.util import check_gpu
  from utils import tensors_allclose
label_desc: Use image node_id 6 for calling a global function with example usage: test_hist(nbin_offset_dim_dtype_inp, backend_pair) without return types