codeception treats every public method as a test. However I have a method that I need to be public. However, it is not a test. Can I somehow annotate it to tell codeception that it should not be run as a test?
You can start the function with an underscore to let Codeception know it's not a test:
public function _after(AcceptanceTester $I)
{
}