  On a manifold equipped with a bivector field, we introduce for every
Hamiltonian a Lagrangian on paths valued in the cotangent space whose
stationary points projects onto Hamiltonian vector fields. We show that the
remaining components of those stationary points tell whether the bivector field
is Poisson or at least defines an integrable distribution - a class of bivector
fields generalizing twisted Poisson structures that we study in detail.
