code: def binarize_kernel(x, quantize_zero_to):
      """Performs binarization of one kernel"""
      y = np.sign(x)
      y[y == 0] = quantize_zero_to
      y = (y.T * np.mean(np.abs(x), tuple(range(1, x.ndim))).T).T
      return y
  
file_path: nnabla/python/test/function/test_binary_weight_convolution.py
imports: from __future__ import division
  import pytest
  import numpy
  import nnabla
  import nnabla.functions
  import refs
  from nbla_test_utils import list_context
label_desc: Use image node_id 1 for calling a global function with example usage: binarize_kernel(x, quantize_zero_to) and returns: y