<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def parse_unifrac(unifracFN):
 """ Parses the unifrac results file into a dictionary :type unifracFN: str :param unifracFN: The path to the unifrac results file :rtype: dict :return: A dictionary with keys: 'pcd' (principle coordinates data) which is a dictionary of the data keyed by sample ID, 'eigvals' (eigenvalues), and 'varexp' (variation explained) """

    with open(unifracFN, "rU") as uF:
        first = uF.next().split("\t")
        lines = [line.strip() for line in uF]

    unifrac = {"pcd": OrderedDict(), "eigvals": [], "varexp": []}
    if first[0] == "pc vector number":
        return parse_unifrac_v1_8(unifrac, lines)
    elif first[0] == "Eigvals":
        return parse_unifrac_v1_9(unifrac, lines)
    else:
        raise ValueError("File format not supported/recognized. Please check input "
                         "unifrac file.")