code: def _check_reduce_option(reduce):
      if reduce not in ("mean", "no"):
          raise ValueError(
              "only 'mean' and 'no' are valid for 'reduce', but '%s' is "
              "given" % reduce
          )
  
imports: import numpy
  import six
  import chainer
  from chainer import backend
  from chainer.backends import cuda
  from chainer import function_node
  from chainer.functions.activation import log_softmax
  from chainer.utils import type_check
  from chainer import variable
  import chainerx
label_desc: Use image node_id 3 for calling a global function with example usage: _check_reduce_option(reduce) without return types