code: def _apply_reduction(
      op,
      input_tensor,
      axis=None,
      keepdims=False,
      name=None,  # pylint: disable=unused-argument
      include_dtype_kwarg=False,
  ):
      """Implements reduce_* for nptf."""
      input_tensor = _convert_to_tensor(input_tensor)
      axis = _astuple(axis)
      kwargs = (
          dict(dtype=input_tensor.dtype) if include_dtype_kwarg else {}
      )
      return op(input_tensor, axis=axis, keepdims=keepdims, **kwargs)
  
imports: import collections
  import functools
  import numpy
  import numpy
  from tensorflow_probability.python.internal.backend.numpy import _utils
  from tensorflow_probability.python.internal.backend.numpy.numpy_array import _reverse
  from tensorflow_probability.python.internal.backend.numpy.numpy_array import one_hot
  from tensorflow_probability.python.internal.backend.numpy.ops import _convert_to_tensor
label_desc: Use image node_id 27 for calling a global function with example usage: _apply_reduction(op, input_tensor, axis, keepdims, name, include_dtype_kwarg) and returns: op