code: def sum_over_dims(x: OnGrid, *, params=None):
      new_params = jnp.sum(x.params, axis=-1, keepdims=True)
      return x.replace_params(new_params)
  
imports: from typing import List
  import numpy
  from jax import numpy
  from jaxdf.conv import reflection_conv
  from jaxdf.core import operator
  from jaxdf.discretization import Continuous, FiniteDifferences, FourierSeries, OnGrid
  from jaxdf.operators.differential import get_fd_coefficients
label_desc: Use image node_id 15 for calling a global function with example usage: sum_over_dims(x) and returns: x