docstr: Binary tree from the NUTS algorithm.
  
  Parameters
  ----------
  leapfrog: function
      A function that performs a single leapfrog step.
  start: integration.State
      The starting point of the trajectory.
  step_size: float
      The step size to use in this tree
  Emax: float
      The maximum energy change to accept before aborting the
      transition as diverging.
docstr_tok: ["Binary","tree","from","the","NUTS","algorithm",".","Parameters","--","--","--","--","--","leapfrog",":","function","A","function","that","performs","a","single","leapfrog","step",".","start",":","integration.State","The","starting","point","of","the","trajectory",".","step_size",":","float","The","step","size","to","use","in","this","tree","Emax",":","float","The","maximum","energy","change","to","accept","before","aborting","the","transition","as","diverging","."]
code: def __init__(
      self,
      ndim: int,
      integrator: integration.CpuLeapfrogIntegrator,
      start: State,
      step_size: float,
      Emax: float,
  ):
      """Binary tree from the NUTS algorithm.
  
      Parameters
      ----------
      leapfrog: function
          A function that performs a single leapfrog step.
      start: integration.State
          The starting point of the trajectory.
      step_size: float
          The step size to use in this tree
      Emax: float
          The maximum energy change to accept before aborting the
          transition as diverging.
      """
      self.ndim = ndim
      self.integrator = integrator
      self.start = start
      self.step_size = step_size
      self.Emax = Emax
      self.start_energy = start.energy
  
      self.left = self.right = start
      self.proposal = Proposal(
          start.q.data, start.q_grad, start.energy, start.model_logp, 0
      )
      self.depth = 0
      self.log_size = 0.0
      self.log_accept_sum = -np.inf
      self.mean_tree_accept = 0.0
      self.n_proposals = 0
      self.p_sum = start.p.data.copy()
      self.max_energy_change = 0.0
  
imports: from __future__ import annotations
  from collections import namedtuple
  import numpy
  from pymc.math import logbern
  from pymc.pytensorf import floatX
  from pymc.stats.convergence import SamplerWarning
  from pymc.step_methods.compound import Competence
  from pymc.step_methods.hmc import integration
  from pymc.step_methods.hmc.base_hmc import BaseHMC, DivergenceInfo, HMCStepData
  from pymc.step_methods.hmc.integration import IntegrationError, State
  from pymc.vartypes import continuous_types
label_desc: Use image node_id 1 to create a new _Tree object  with example: obj = _Tree(ndim, integrator, start, step_size, Emax)