def calculate_lower_bounds(x_s, y_s):
    """
        Calculate lower bounds of total timesteps and average episodic
        return per iteration.

        Parameters:
            x_s - A list of lists of total timesteps so far per seed.
            y_s - A list of lists of average episodic return per seed.

        Return: 
            Lower bounds of both x_s and y_s
    """
    # x_low is lower bound of timesteps so far, y is lower bound of average episodic reward
    x_low, y_low = x_s[0], y_s[0]

    # Find lower bound amongst all trials per iteration
    for xs, ys in zip(x_s[1:], y_s[1:]):
        x_low = [x if x < x_low[i] else x_low[i] for i, x in enumerate(xs)]
        y_low = [y if y < y_low[i] else y_low[i] for i, y in enumerate(ys)]
    return x_low, y_low
Calculate lower bounds of total timesteps and average episodic
return per iteration.

Parameters:
x_s - A list of lists of total timesteps so far per seed.
y_s - A list of lists of average episodic return per seed.

Return:
Lower bounds of both x_s and y_s
part4/make_graph.py