def METHOD_NAME(line: dict, edge_len: int):
    """
    Calculates metrics for every entry on manifest.json.
    Args:
        line - line of manifest.json (dict)
        edge_len - number of characters for edge Character Error Rate (CER) calculations
    Returns:
        line - line of manifest.json (dict) with the following metrics added:
        WER - word error rate
        CER - character error rate
        start_CER - CER at the beginning of the audio sample considering first 'edge_len' characters
        end_CER - CER at the end of the audio sample considering last 'edge_len' characters
        len_diff_ratio - ratio between reference text length and predicted text length with respect to
            the reference text length (length measured in number of characters)
    """
    eps = 1e-9
    text = line["text"].split()
    pred_text = line["pred_text"].split()
    num_words = max(len(text), eps)
    word_dist = editdistance.eval(text, pred_text)
    line["WER"] = word_dist / num_words * 100.0
    num_chars = max(len(line["text"]), eps)
    char_dist = editdistance.eval(line["text"], line["pred_text"])
    line["CER"] = char_dist / num_chars * 100.0
    line["start_CER"] = editdistance.eval(line["text"][:edge_len], line["pred_text"][:edge_len]) / edge_len * 100
    line["end_CER"] = editdistance.eval(line["text"][-edge_len:], line["pred_text"][-edge_len:]) / edge_len * 100
    line["len_diff_ratio"] = 1.0 * abs(len(text) - len(pred_text)) / max(len(text), eps)
    return line