class_docstr: Fourier Basis linear function approximation.
  
  Requires the ranges for each dimension, and is thus able to use only sine or
  cosine (and uses cosine). So, this has half the coefficients that a full
  Fourier approximation would use.
  
  Adapted from Will Dabney's (wdabney@) TF implementation for JAX.
  
  From the paper:
  G.D. Konidaris, S. Osentoski and P.S. Thomas. (2011)
  Value Function Approximation in Reinforcement Learning using the Fourier Basis
code: def __init__(
      self,
      nvars: int,
      min_vals: Union[float, Sequence[float]] = 0.0,
      max_vals: Optional[Union[float, Sequence[float]]] = None,
      order: int = 3,
  ):
      self.order = order
      self.min_vals = jnp.array(min_vals)
      self.max_vals = max_vals
      terms = itertools.product(range(order + 1), repeat=nvars)
      if max_vals is not None:
          assert len(self.min_vals) == len(self.max_vals)
          self.max_vals = jnp.array(self.max_vals)
          self.denominator = [
              max_vals[i] - min_vals[i] for i in range(len(min_vals))
          ]
  
      # Removing first iterate because it corresponds to the constant bias
      self.multipliers = jnp.array(
          [list(map(int, x)) for x in terms][1:]
      )
  
imports: import itertools
  import time
  from typing import Optional, Sequence, Tuple, Union
  from absl import logging
  from dopamine.discrete_domains import atari_lib
  from flax import linen
  import gin
  import jax
  import jax.numpy
  import numpy
label_desc: Use image node_id 1 to create a new FourierBasis object from inherited base classes: object with example: obj = FourierBasis(nvars, min_vals, max_vals, order)