docstr: Updates state based on an event (collision).
docstr_tok: ["Updates","state","based","on","an","event","(","collision",")","."]
code: def state_update(self, state):
      """Updates state based on an event (collision)."""
      pos, vel, log_radius = state
      pos = (
          pos + 1e-7
      )  # need to add a small eps so as not to trigger the event function immediately.
      vel = -vel * (1 - self.absorption)
      return (pos, vel, log_radius)
  
file_path: torchdiffeq/examples/bouncing_ball.py
imports: import argparse
  import matplotlib.pyplot
  import torch
  import torch.nn
  from torchdiffeq import odeint, odeint_adjoint
  from torchdiffeq import odeint_event
label_desc: Use image node_id 5 for calling the BouncingBallExample obj's underlying member method code with example usage: obj.state_update(state) and returns: pos,  vel,  log_radius