code: def test_from_function():
      def f(params, x):
          return jnp.sum(params) * x
  
      def init_params(rng, domain):
          return jnp.ones((1,))
  
      domain = Domain((64,), dx=(1.0,))
      seed = random.PRNGKey(42)
      field = Continuous.from_function(domain, init_params, f, seed)
  
imports: import numpy
  import pytest
  from jax import jit
  from jax import numpy
  from jax import random
  from jaxdf.discretization import Continuous
  from jaxdf.geometry import Domain
label_desc: Use image node_id 7 for calling a global function with example usage: test_from_function() and returns: unknown, jnp