def assign_cm(val, len, wf):
    """
    assign_cm is a simple helper function used in compare_events
    Arguments:
        val: string value to specify which area of the confusion matrix this point belongs to: 'tp', 'fp', or 'fn'
        len: how long the total array should be
        wf: integer widening factor that determines how many points should be turned into 'tn' on both edges
    Returns:
        cm: series of length len, with wf 'tn' at the beginning and the end filed with val in between
    """
    cm = ['tn' for i in range(len)]
    for i in range(wf, len - wf):
        cm[i] = val
    return cm