code: def reduce(x, op="sum"):
      """Reduction function with given operation.
  
      Args:
          x (Variable): An input.
          op (str): 'sum' or 'mean'.
  
      Note:
          This is deprecated. Use ``mean`` or ``sum`` instead.
  
      """
      import warnings
  
      warnings.warn(
          "Deprecated API. Use ``sum`` or ``mean`` instead.",
          DeprecationWarning,
      )
      from .function_bases import reduce_sum, reduce_mean
  
      if op == "sum":
          return reduce_sum(x)
      elif op == "mean":
          return reduce_mean(x)
      raise ValueError()
  
imports: from __future__ import absolute_import
  from .function_bases import *
  from .None import dtypes
  import nnabla
  import numpy
  from .normalization_functions import *
  from .numpy_compat_functions import *
label_desc: Use image node_id 9 for calling a global function with example usage: reduce(x, op) and returns: reduce_sum, reduce_mean