def convert_pair(fixedvarindex, pair):
    """ Convert pair variable to pair for a secondary covariance matrix """
    if pair.__class__ == int:
        pair = [pair]
        pair2 = [None]
    else:
        pair2 = [None, None]
    if fixedvarindex != None:
        for ii, pp in enumerate(pair):
            if pp > fixedvarindex + 1:
                pair2[ii] = pp - 1
            else:
                pair2[ii] = pp
    return pair2
