Write a Python function to classify data points as low, medium and high according to the given threshold values.
threshold = [4, 6]
def classify(value, threshold):
    if value < threshold[0]:
        return 'low'
    elif threshold[0] <= value < threshold[1]:
        return 'medium'
    else:
        return 'high'