def set_axis_limits(ax, xlimits=None, ylimits=None):
    """Sets the x- and y-boundaries of the axis (if provided)

    :param ax: axis object
    :param xlimits: a 2-tuple (lower_bound, upper_bound)
    :param ylimits: a 2-tuple (lower_bound, upper_bound)
    :returns: ax
    """
    if xlimits is not None:
        ax.set_xlim(*xlimits)
    if ylimits is not None:
        ax.set_ylim(*ylimits)
    return ax