[algorithms][is_valid] declare debug_complement_graph as inline

Should fix clang-darwin-{asan,asan11,tot,tot11} errors in develop regression matrix.