<commit_before>import * as t from "../types";

/**
 * [Please add a description.]
 */

export default function (ast, comments, tokens) {
  if (ast && ast.type === "Program") {
    return t.file(ast, comments || [], tokens || []);
  } else {
    throw new Error("Not a valid ast?");
  }
}<commit_msg>Add descriptions to helpers/normalize-ast<commit_after>import * as t from "../types";

/**
 * Normalize an AST.
 *
 * - Wrap `Program` node with a `File` node.
 */

export default function (ast, comments, tokens) {
  if (ast && ast.type === "Program") {
    return t.file(ast, comments || [], tokens || []);
  } else {
    throw new Error("Not a valid ast?");
  }
}
{'fraction_non_alphanumeric': 0.1897590361445783, 'fraction_numerical': 0.0, 'mean_word_length': 3.130434782608696, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5609948', 'n_tokens_mistral': 216, 'n_tokens_neox': 213, 'n_words': 69}