code: def functional(x: OnGrid, *, params=None):
      r"""Maps the given function over the parameters of the field
  
      !!! example
          ```python
          x = OnGrid(params=-1.0, ...)
          y = functional(x)(jnp.sum)
          y.params # This is -1.0
          ```
      """
  
      def decorator(fun):
          return fun(x.params)
  
      return decorator
  
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 6 for calling a global function with example usage: functional(x) and returns: decorator, fun