parameters: (
      logpsi: Callable,
      pars: PyTree,
      σ: Array,
      args: PyTree,
      *,
      chunk_size: Optional[int] = None,
  )
return_statement: return local_value_kernel_chunked(
          logpsi, pars, σ_σ, (σ_σp, mels), chunk_size=chunk_size
      )
docstring: local_value kernel for MCMixedState and generic operators
docstring_summary: local_value kernel for MCMixedState and generic operators
docstring_tokens: local_value kernel for MCMixedState and generic operators
function: def local_value_op_op_cost_chunked(
      logpsi: Callable,
      pars: PyTree,
      σ: Array,
      args: PyTree,
      *,
      chunk_size: Optional[int] = None,
  ):
      """
      local_value kernel for MCMixedState and generic operators
      """
      σp, mels = args
  
      if jnp.ndim(σp) != 3:
          σp = σp.reshape((σ.shape[0], -1, σ.shape[-1]))
          mels = mels.reshape(σp.shape[:-1])
  
      σ_σp = jax.vmap(
          lambda σpi, σi: jax.vmap(lambda σp, σ: jnp.hstack((σp, σ)), in_axes=(0, None))(
              σpi, σi
          ),
          in_axes=(0, 0),
          out_axes=0,
      )(σp, σ)
      σ_σ = jax.vmap(lambda σi: jnp.hstack((σi, σi)), in_axes=0)(σ)
  
      return local_value_kernel_chunked(
          logpsi, pars, σ_σ, (σ_σp, mels), chunk_size=chunk_size
      )
function_tokens: def local_value_op_op_cost_chunked ( logpsi : Callable , pars : PyTree , σ: rray, args : PyTree , * , chunk_size : Optional [ int ] = None , ) : σp, els  rgs if jnp . ndim ( σp) =  : σp  p.r e shape(( σ . sh a pe[0] , - 1 σ . ha p e[-1] ) ) mels = mels . reshape ( σp. s hape[ : - 1 ] ) σ_σp = j x.v m ap( lambda σpi, i:  j x.v m ap(l a mbda σ , σ : jn p hst a ck((σp , σ)) , in _ a x s=(0, N o n e ) ( σpi, i ) , in_axes = ( 0 , 0 ) , out_axes = 0 , ) ( σp, ) σ_σ = j x.v m ap(l a mbda σ : j n .hs t ack((σ i ,  σi ) , i n _ a es=0)(σ ) return local_value_kernel_chunked ( logpsi , pars , σ_σ,  ( _ σp, me l ), c h u k_size=chu n k_size )