def METHOD_NAME(P, XDot_flag, XDDot_flag, accuracy):
    testFailCount = 0                       # zero unit test result counter
    testMessages = []                       # create empty array to store test log messages
    X1 = np.array([0, 1, 2, 3, 4, 5, 6])
    X2 = np.array([5, 4, 3, 2, 1, 0, 1])
    X3 = np.array([3, 2, 1, 2, 3, 4, 5])
    Input = BSpline.InputDataSet(X1, X2, X3)
    Input.setT([0, 2, 3, 5, 7, 8, 10])
    if XDot_flag:
        Input.setXDot_0([0, 0, 0])
        Input.setXDot_N([0, 0, 0])
    if XDDot_flag:
        Input.setXDDot_0([0, 0, 0])
        Input.setXDDot_N([0.2, 0, 0])
    Output = BSpline.OutputDataSet()
    BSpline.interpolate(Input, 101, P, Output)
    for i in range(len(Output.T)):
        for j in range(len(Input.T)):
            if abs(Output.T[i][0] - Input.T[j][0]) < accuracy:
                if not abs(Output.X1[i][0] - X1[j]) < accuracy:
                    testFailCount += 1
                    testMessages.append("FAILED: BSpline." + " Function of order {} failed coordinate #1 check at time t = {}".format(P,Input.T[j][0]))
                if not abs(Output.X2[i][0] - X2[j]) < accuracy:
                    testFailCount += 1
                    testMessages.append("FAILED: BSpline." + " Function of order {} failed coordinate #2 check at time t = {}".format(P,Input.T[j][0]))
                if not abs(Output.X3[i][0] - X3[j]) < accuracy:
                    testFailCount += 1
                    testMessages.append("FAILED: BSpline." + " Function of order {} failed coordinate #3 check at time t = {}".format(P,Input.T[j][0]))
    if XDot_flag:
        if not ((abs(Output.XD1[0][0]-Input.XDot_0[0][0]) < accuracy) and 
                (abs(Output.XD2[0][0]-Input.XDot_0[1][0]) < accuracy) and 
                (abs(Output.XD3[0][0]-Input.XDot_0[2][0]) < accuracy)):
            testFailCount += 1
            testMessages.append("FAILED: BSpline." + " Function of order {} failed first derivative at starting point".format(P))
    if XDDot_flag:
        if not ((abs(Output.XDD1[0][0]-Input.XDDot_0[0][0]) < accuracy) and 
                (abs(Output.XDD2[0][0]-Input.XDDot_0[1][0]) < accuracy) and 
                (abs(Output.XDD3[0][0]-Input.XDDot_0[2][0]) < accuracy)):
            testFailCount += 1
            testMessages.append("FAILED: BSpline." + " Function of order {} failed second derivative at starting point".format(P))
    return [testFailCount, ''.join(testMessages)]