pass callbacks py cons reference