Add documentation to `pin_state`