def _pause_resume(self, opts, pause):
    if (not opts.name):
        _exit_if_errors([f"Flag --name is required with the {('--pause' if pause else '--resume')} flag"])
    (_, err) = self.rest.pause_resume_function(opts.name, pause)
    _exit_if_errors(err)
    _success(f"Function was {('paused' if pause else 'resumed')}")
def _pause_resume(self, opts, pause):
    if (not opts.name):
        _exit_if_errors([f"Flag --name is required with the {('--pause' if pause else '--resume')} flag"])
    (_, err) = self.rest.pause_resume_function(opts.name, pause)
    _exit_if_errors(err)
    _success(f"Function was {('paused' if pause else 'resumed')}")