code: def _calc_colour_hist(img):
      """
      calculate colour histogram for each region
  
      the size of output histogram will be BINS * COLOUR_CHANNELS(3)
  
      number of bins is 25 as same as [uijlings_ijcv2013_draft.pdf]
  
      extract HSV
      """
  
      BINS = 25
      hist = numpy.array([])
  
      for colour_channel in (0, 1, 2):
          # extracting one colour channel
          c = img[:, colour_channel]
  
          # calculate histogram for each colour and join to the result
          hist = numpy.concatenate(
              [hist] + [numpy.histogram(c, BINS, (0.0, 255.0))[0]]
          )
  
      # L1 normalize
      hist = hist / len(img)
  
      return hist
  
imports: import sys
  from past.builtins import cmp
  import skimage.io
  import skimage.feature
  import skimage.color
  import skimage.transform
  import skimage.util
  import skimage.segmentation
  import numpy
label_desc: Use image node_id 7 for calling a global function with example usage: _calc_colour_hist(img) and returns: hist