code: def reduce(x, op='sum'):
      
      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()
docs: Reduction function with given operation.
  
      Args:
          x (Variable): An input.
          op (str): 'sum' or 'mean'.
  
      Note:
          This is deprecated. Use ``mean`` or ``sum`` instead.