on_cast python check_self
