code: def twohot_pair(
      min_value: float, max_value: float, num_bins: int
  ) -> TxPair:
      """Construct a TxPair matching a 2-hot reparametrisation and its inverse."""
      apply_fn = functools.partial(
          transforms.transform_to_2hot,
          min_value=min_value,
          max_value=max_value,
          num_bins=num_bins,
      )
      apply_inv_fn = functools.partial(
          transforms.transform_from_2hot,
          min_value=min_value,
          max_value=max_value,
          num_bins=num_bins,
      )
      return TxPair(apply_fn, apply_inv_fn)
  
file_path: rlax/rlax/_src/nonlinear_bellman.py
imports: import collections
  import functools
  import chex
  import jax.numpy
  from rlax._src import base
  from rlax._src import multistep
  from rlax._src import transforms
label_desc: Use image node_id 1 for calling a global function with example usage: twohot_pair(min_value, max_value, num_bins) and returns: TxPair