<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def true_negatives(links_true, links_pred, total):
 """Count the number of True Negatives. Returns the number of correctly predicted non-links, also called the number of True Negatives (TN). Parameters links_true: pandas.MultiIndex, pandas.DataFrame, pandas.Series The true (or actual) links. links_pred: pandas.MultiIndex, pandas.DataFrame, pandas.Series The predicted links. total: int, pandas.MultiIndex The count of all record pairs (both links and non-links). When the argument is a pandas.MultiIndex, the length of the index is used. Returns ------- int The number of correctly predicted non-links. """


    links_true = _get_multiindex(links_true)
    links_pred = _get_multiindex(links_pred)

    if isinstance(total, pandas.MultiIndex):
        total = len(total)

    return int(total) - len(links_true | links_pred)