def _clean_url_path(path, is_local_path):
    # type: (str, bool) -> str
    """
    Clean the path portion of a URL.
    """
    clean_func = _clean_file_url_path if is_local_path else _clean_url_path_part
    # Split on the reserved characters prior to cleaning so that
    # revision strings in VCS URLs are properly preserved.
    parts = _reserved_chars_re.split(path)

    cleaned_parts = []
    for to_clean, reserved in pairwise(itertools.chain(parts, [''])):
        cleaned_parts.append(clean_func(to_clean))
        # Normalize %xx escapes (e.g. %2f -> %2F)
        cleaned_parts.append(reserved.upper())

    return ''.join(cleaned_parts)
                            args=(x_new - x_old,
                                  timestamp_new - timestamp_old))
    return result


# Velocity Values
one_time_integrated_ap_LH = []
one_time_integrated_ur_LH = []
one_time_integrated_dp_LH = []

# Displacement Values
two_times_integrated_ap_LH = []
two_times_integrated_ur_LH = []
two_times_integrated_dp_LH = []

for old_val, new_val in pairwise(acc_LH):
    ap_LH.append(new_val['AP'])
    one_time_integrated_ap_LH.append(
        (integrate_points(new_val['AP'], old_val['AP'], new_val['timestamp'],
                          old_val['timestamp']))[0])
    ur_LH.append(new_val['UR'])
    one_time_integrated_ur_LH.append(
        (integrate_points(new_val['UR'], old_val['UR'], new_val['timestamp'],
                          old_val['timestamp']))[0])
    dp_LH.append(new_val['DP'])
    one_time_integrated_dp_LH.append(
        (integrate_points(new_val['DP'], old_val['DP'], new_val['timestamp'],
                          old_val['timestamp']))[0])
    timestamps_LH.append(new_val['timestamp'])

ax1 = plt.axes(projection='3d')