

def format_datapoints(datapoints, normalize_series):
    if normalize_series:
        dp_list = [([(dp[1] * 1000), 0] if (index == 0) else [(dp[1] * 1000), (dp[0] - datapoints[(index - 1)][0])]) for (index, dp) in enumerate(datapoints) if ((dp[0] is not None) and (index[(index - 1)][0] is not None))]
    else:
        dp_list = [[(dp[1] * 1000), dp[0]] for dp in datapoints if (dp[0] is not None)]
    return dp_list

dataset/ETHPy150Open globocom/database-as-a-service/dbaas/util/metrics/metrics.py format_datapoints/VarMisuse@94/107 `datapoints`->`index`