def identify_var_units(label):
    """
    This function parses the x-label or y-label to figure out the
    variable name and unit if possible.

    Parameters
    ----------
    label : str
        The label of x- or y-axis.

    Returns
    -------
    var : str
        The name of the variable.
    unit :str
        The units of the variable.
    """
    if label is not None:
        if "(" in label:
            if "$" in label.split("(")[1]:
                unit = " ".join(label.split("$")[1].split("$")[0].split(" ")[:-1])
            else:
                unit = " " + label.split("(")[1].split(")")[0]
            var = " ".join(label.split("(")[:-1]).lower()
            if var[-1] == " ":
                var = " ".join(var.split(" ")[:-1]).lower()
        else:
            unit = ""
            var = label.lower()
    else:
        unit = ""
        var = None

    if label == "X-axis":
        var = "x"
    if label == "Y-axis":
        var = "y"

    return var, unit