<commit_before>#load "runhelpers.cake"

using System.Net;

/// <summary>
/// Downloads and unzips a NuGet package directly without any dependencies.
/// </summary>
void DownloadNuGetPackage(string packageID, string version, string outputDirectory, string feedUrl)
{
    var outputFolder = System.IO.Path.Combine(outputDirectory, packageID);
    var outputFileName = System.IO.Path.ChangeExtension(outputFolder, "nupkg");

    if (DirectoryExists(outputFolder))
    {
        DeleteDirectory(outputFolder, recursive: true);
    }

    using (var client = new WebClient())
    {
        client.DownloadFile(
            address: $"{feedUrl}/{packageID}/{version}",
            fileName: outputFileName);
    }

    Unzip(outputFileName, outputFolder);
}

private ExitStatus RunNuGetInstall(string packageIdOConfigFilePath, string version, bool excludeVersion, bool noCache, bool prerelease, string outputDirectory)
{
    var nugetPath = Environment.GetEnvironmentVariable("NUGET_EXE");

    var argList = new List<string> { "install", packageIdOConfigFilePath };

    if (!string.IsNullOrWhiteSpace(version))
    {
        argList.Add("-Version");
        argList.Add(version);
    }

    if (excludeVersion)<commit_msg>Remove dead code from nuget.cake<commit_after>#load "runhelpers.cake"

private ExitStatus RunNuGetInstall(string packageIdOConfigFilePath, string version, bool excludeVersion, bool noCache, bool prerelease, string outputDirectory)
{
    var nugetPath = Environment.GetEnvironmentVariable("NUGET_EXE");

    var argList = new List<string> { "install", packageIdOConfigFilePath };

    if (!string.IsNullOrWhiteSpace(version))
    {
        argList.Add("-Version");
        argList.Add(version);
    }

    if (excludeVersion)
{'fraction_non_alphanumeric': 0.10734787600459242, 'fraction_numerical': 0.0, 'mean_word_length': 4.0964912280701755, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 3, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6467298', 'n_tokens_mistral': 498, 'n_tokens_neox': 481, 'n_words': 113}