Create a CodeContext object to wrap some logic