Draft: Better error message when trying to get sequence from sequencer
Follow up to !125 (merged). Will raise an explanatory error message when using sequencer.sequence().
Due to qcodes limitations, the error message must be the same when using sequencer.sequence() or sequencer.sequence.cache() with invalid cache. Lambdas cannot contain statements, which is why a new private function is needed.