def METHOD_NAME(self, runtime, should_warn, function_type, patched_click):
    resources = {"MyFunction": {"Type": function_type, "Properties": {"Runtime": runtime}}}
    self.package_command_context._warn_preview_runtime([Mock(resources=resources)])
    if should_warn:
        patched_click.secho.assert_called_once()
    else:
        patched_click.secho.assert_not_called()