def cum_pattern(data):
    """
        [Description] : Utility method to calculate cumulative sum of sequential no.s if sign is same.
    """
    prev = 0
    out = []
    for l in data:
        new = l + prev if l * prev > 0 else l
        out.append(new)
        prev = new
    return out
