pub trait ApplyGradient { type Gradient; // Required method fn apply_gradient(&mut self, gradient: &Self::Gradient); }