Setting up a node based finite state machine for a rigid body 2d where I can use func _integrate_forces

Godot 4.3

Hi I am working on a project where I want my characters movement to be affected by physics so I tried using a rigidbody 2d and the function _integrate forces. I also want to setup a node based finite state machine but whenever I looking for one it is made for a characterbody2d and I have tried retrofitting them to a rigidbody 2d but have had no luck. If anyone knows how to do this or has a resource I can look into I would appreciate it.