Code sharing between co-authors
I will give the answer I have given a million times already on this forum: Communicate. 

If you're unsure whether or not you processing the data will yield a co-authorship, write an email asking exactly this before you do the data processing. If the other side is an experienced researcher, then they will understand that as a postdoc you have many obligations to juggle and that you need to spend your time on things that will yield publications.

If you're unsure whether or not you will be expected to share your code, write an email asking exactly this before you start working with them. They may ask for it, and in that case you will have to discuss with them under what conditions you would be willing to do that. Or they may not even want your code and simply be happy to rely on you this time and in future times to do the data analysis in return for co-authorship.

In both cases, you can spend your day worrying and speculating, but you will never know the answer unless you simply ask what's on your mind. Communicate!