def create_axes(figure, positions):
    """
    Return the twin axes given by `xaxis`, `yaxis`.

    Parameters
    ----------
    figure : matplotlib Figure
        The figure that will get new axes.
    positions : list of tuples
        Each tuple contains the name of an xaxis position ('botton' or 'top')
        and a yaxis position ('left' or 'right').

    Returns
    -------
    axes_dict : dict
        A dictionary containing the requested axes.
    """
    bottom_left = 'bottom', 'left'
    bottom_right = 'bottom', 'right'
    top_left = 'top', 'left'
    top_right = 'top', 'right'
    axes_dict = {}
    default_ax = figure.first_subplot().get_mpl_axes()
    axes_dict[bottom_left] = default_ax
    if bottom_right in positions:
        axes_dict[bottom_right] = default_ax.twinx()
        if bottom_left not in positions and top_left not in positions:
            default_ax.yaxis.set_visible(False)
    if top_left in positions:
        axes_dict[top_left] = default_ax.twiny()
        if bottom_left not in positions and bottom_right not in positions:
            default_ax.xaxis.set_visible(False)
    if top_right in positions:
        if top_left in positions:
            axes_dict[top_right] = axes_dict[top_left].twinx()
            if bottom_left not in positions and bottom_right not in positions:
                axes_dict[top_left].yaxis.set_visible(False)
        elif bottom_right in positions:
            axes_dict[top_right] = axes_dict[bottom_right].twiny()
            if bottom_left not in positions and bottom_right not in positions:
                axes_dict[bottom_right].xaxis.set_visible(False)
        else:
            axes_dict[bottom_right] = default_ax.twinx()
            if bottom_left not in positions and top_left not in positions:
                default_ax.yaxis.set_visible(False)
            axes_dict[top_right] = axes_dict[bottom_right].twiny()
            if bottom_left not in positions and bottom_right not in positions:
                default_ax.xaxis.set_visible(False)
                axes_dict[bottom_right].xaxis.set_visible(False)
    return axes_dict
