There might be a misunderstanding. If You define this reusable code as a lambda (function), it can be used in all rules you have in your .rules file. What you can’t do is sharing this over splitted rules files.
You can find a good example on using labdas here :