code: def test_override_operator_new_discretization(get_ongrid_fields):
      a, b = get_ongrid_fields
  
      z = operators.compose(a)(jnp.exp)
      z_old = z.params
  
      class MyDiscr(OnGrid):
          def __init__(self, *args, **kwargs):
              super().__init__(*args, **kwargs)
  
      @operator
      def compose(x: MyDiscr, *, params=None):
          def decorator(fun):
              return x.replace_params(fun(x.params) + 10)
  
          return decorator
  
      a_new = MyDiscr(a.params, a.domain)
  
      z = operators.compose(a_new)(jnp.exp)
      print(z.params, jnp.exp(1.0) + 10)
      assert z.params == jnp.exp(1.0) + 10
  
      z = operators.compose(a)(jnp.exp)
      assert z.params == z_old
  
file_path: jaxdf/tests/test_core.py
imports: import jax
  import numpy
  import pytest
  from jax import jit
  from jax import numpy
  from jaxdf import *
  from jaxdf.signatures import SignatureError
label_desc: Use image node_id 7 for calling a global function with example usage: test_override_operator_new_discretization(get_ongrid_fields) and returns: decorator, x