def get_contiguous_activity_borders(data, label):
    '\n    returns a dict with all starts ends of all labels provided in label variable\n    '
    labels = data[label].unique()
    r = {}
    for l in labels:
        a = data[(data[label] == l)].index.values
        r[l] = get_contigous_borders(a)
    r['length'] = data.shape[0]
    return r
returns a dict with all starts ends of all labels provided in label variable
def get_contiguous_activity_borders(data, label):
    '\n    \n    '
    labels = data[label].unique()
    r = {}
    for l in labels:
        a = data[(data[label] == l)].index.values
        r[l] = get_contigous_borders(a)
    r['length'] = data.shape[0]
    return r