<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def load_segmented_data(filename):
 """ Helper function to load segmented gait time series data. :param filename: The full path of the file that contais our data. This should be a comma separated value (csv file). :type filename: str :return: The gait time series segmented data, with a x, y, z, mag_acc_sum and segmented columns. :rtype: pandas.DataFrame """

    data = pd.read_csv(filename, index_col=0)
    data.index = data.index.astype(np.datetime64)
    
    return data