def symmetric_ema(xolds, yolds, low=None, high=None, n=<NUM_LIT>, decay_steps=<NUM_LIT:1.>, low_counts_threshold=<NUM_LIT>):
xs, ys1, count_ys1 = one_sided_ema(xolds, yolds, low, high, n, decay_steps, low_counts_threshold=<NUM_LIT:0>)<EOL>_,  ys2, count_ys2 = one_sided_ema(-xolds[::-<NUM_LIT:1>], yolds[::-<NUM_LIT:1>], -high, -low, n, decay_steps, low_counts_threshold=<NUM_LIT:0>)<EOL>ys2 = ys2[::-<NUM_LIT:1>]<EOL>count_ys2 = count_ys2[::-<NUM_LIT:1>]<EOL>count_ys = count_ys1 + count_ys2<EOL>ys = (ys1 * count_ys1 + ys2 * count_ys2) / count_ys<EOL>ys[count_ys < low_counts_threshold] = np.nan<EOL>return xs, ys, count_ys<EOL>
perform symmetric EMA (exponential moving average)
smoothing and resampling to an even grid with n points.
Does not do extrapolation, so we assume
xolds[0] <= low && high <= xolds[-1]

Arguments:

xolds: array or list  - x values of data. Needs to be sorted in ascending order
yolds: array of list  - y values of data. Has to have the same length as xolds

low: float            - min value of the new x grid. By default equals to xolds[0]
high: float           - max value of the new x grid. By default equals to xolds[-1]

n: int                - number of points in new x grid

decay_steps: float    - EMA decay factor, expressed in new x grid steps.

low_counts_threshold: float or int
                      - y values with counts less than this value will be set to NaN

Returns:
    tuple sum_ys, count_ys where
        xs        - array with new x grid
        ys        - array of EMA of y at each point of the new x grid
        count_ys  - array of EMA of y counts at each point of the new x grid