code: def from_grid(N):
      domain = Domain(N, dx=[1.0] * len(N))
      params = jnp.ones(domain.N + (1,))
      field = OnGrid(params, domain)
      grid_values = field.on_grid
  
      field_from_grid = OnGrid.from_grid(grid_values, domain)
      assert jnp.allclose(field_from_grid.params, field.params)
  
imports: import pytest
  from jax import jit
  from jax import numpy
  from jax import random
  from jaxdf.discretization import FiniteDifferences, FourierSeries, OnGrid
  from jaxdf.geometry import Domain
  from jaxdf.operators import inverse
label_desc: Use image node_id 7 for calling a global function with example usage: from_grid(N) without return types