code: def test_bincount():
      def test_f(f):
          r = np.arange(10)
          counts = f(r)
          assert isinstance(counts, np.ndarray)
          assert len(counts) == 10
          assert np.all(counts == 1)
  
          r = np.arange(10) + 3
          counts = f(r)
          assert isinstance(counts, np.ndarray)
          assert len(counts) == 13
          assert np.all(counts[3:] == 1)
          assert np.all(counts[:3] == 0)
  
          r = np.arange(10) + 3
          counts = f(r, minlength=5)  # -- ignore minlength
          assert isinstance(counts, np.ndarray)
          assert len(counts) == 13
          assert np.all(counts[3:] == 1)
          assert np.all(counts[:3] == 0)
  
          r = np.arange(10) + 3
          counts = f(r, minlength=15)  # -- pad to minlength
          assert isinstance(counts, np.ndarray)
          assert len(counts) == 15
          assert np.all(counts[:3] == 0)
          assert np.all(counts[3:13] == 1)
          assert np.all(counts[13:] == 0)
  
          r = np.arange(10) % 3 + 3
          counts = f(r, minlength=7)  # -- pad to minlength
          assert list(counts) == [0, 0, 0, 4, 3, 3, 0]
  
      try:
          test_f(base.bincount)
      except TypeError as e:
          if "function takes at most 2 arguments" in str(e):
              raise SkipTest()
          raise
  
imports: from hyperopt.pyll import base
  from hyperopt.pyll.base import Literal, as_apply, Apply, dfs, scope, rec_eval, p0, Lambda, clone_merge
  from nose import SkipTest
  from nose.tools import assert_raises
  import numpy
label_desc: Use image node_id 16 for calling a global function with example usage: test_bincount() without return types