code: def ref_clip_by_value(x, min_, max_):
      if np.isscalar(min_):
          min_ = min_ * np.ones(x.shape)
      min_idx = np.where(x < min_)
      x[min_idx] = min_[min_idx]
  
      if np.isscalar(max_):
          max_ = max_ * np.ones(x.shape)
      max_idx = np.where(x > max_)
      x[max_idx] = max_[max_idx]
      return x
  
file_path: nnabla/python/test/function/test_clip_by_value.py
imports: import pytest
  import numpy
  import nnabla
  import nnabla.functions
  from nbla_test_utils import list_context
  from nnabla.testing import assert_allclose
label_desc: Use image node_id 1 for calling a global function with example usage: ref_clip_by_value(x, min_, max_) and returns: x