Added a mask support for code_parts. Might be temporary.