<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _lay_out_axes(ax, projection):
 """ ``cartopy`` enables a a transparent background patch and an "outline" patch by default. This short method simply hides these extraneous visual features. If the plot is a pure ``matplotlib`` one, it does the same thing by removing the axis altogether. Parameters ax : matplotlib.Axes instance The ``matplotlib.Axes`` instance being manipulated. projection : None or geoplot.crs instance The projection, if one is used. Returns ------- None """

    if projection is not None:
        try:
            ax.background_patch.set_visible(False)
            ax.outline_patch.set_visible(False)
        except AttributeError:  # Testing...
            pass
    else:
        plt.gca().axison = False