code: def fullhistogram(img):
      """
      hist = fullhistogram(img)
  
      Return a histogram with bins *0, 1, ..., ``img.max()``*.
  
      After calling this function, it will be true that
      ``hist[i] == (img == i).sum()``, for all ``i``.
  
      Notes
      -----
      Only handles unsigned integer arrays.
  
      Parameters
      ----------
      img : array-like of an unsigned type
          input image.
  
      Returns
      -------
      hist : an dnarray of type np.uint32
          This will be of size ``img.max() + 1``.
      """
      _verify_is_integer_type(img, "fullhistogram")
      img = np.ascontiguousarray(img)
      if img.dtype == bool:
          ones = img.sum()
          zeros = img.size - ones
          return np.array([zeros, ones], np.uintc)
  
      histogram = np.zeros(int(img.max()) + 1, np.uintc)
      _histogram.histogram(img, histogram)
      return histogram
  
imports: from __future__ import division
  import numpy
  from .None import _histogram
  from .internal import _verify_is_integer_type
label_desc: Use image node_id 1 for calling a global function with example usage: fullhistogram(img) and returns: histogram, np