def METHOD_NAME(self, action):
    xy_position_before = mass_center(self.model, self.sim)
    self.do_simulation(action, self.frame_skip)
    xy_position_after = mass_center(self.model, self.sim)
    xy_velocity = (xy_position_after - xy_position_before) / self.dt
    x_velocity, y_velocity = xy_velocity
    ctrl_cost = self.control_cost(action)
    contact_cost = self.contact_cost
    forward_reward = self._forward_reward_weight * x_velocity
    healthy_reward = self.healthy_reward
    rewards = forward_reward + healthy_reward
    costs = ctrl_cost + contact_cost
    observation = self._get_obs()
    reward = rewards - costs
    terminated = self.terminated
    info = {
        "reward_linvel": forward_reward,
        "reward_quadctrl": -ctrl_cost,
        "reward_alive": healthy_reward,
        "reward_impact": -contact_cost,
        "x_position": xy_position_after[0],
        "y_position": xy_position_after[1],
        "distance_from_origin": np.linalg.norm(xy_position_after, ord=2),
        "x_velocity": x_velocity,
        "y_velocity": y_velocity,
        "forward_reward": forward_reward,
    }
    if self.render_mode == "human":
        self.render()
    return observation, reward, terminated, False, info