def any_check(geom_test, gdf, how):
    """Improve speed for an 'any()' test on a list comprehension.

    Replace a statement like...

    .. code::

        if any([geom_test.touches(g) for g in gdf.geometry]):

    ... with the following:

    .. code::

        if any_check(geom_test, gdf, how='touches'):

    Instead of iterating through all of 'g in gdf.geometry', return
    'True' after the first match.

    Parameters
    ----------
    geom_test : Shapely object
        Object which's function 'how' is called.
    gdf : GeoDataFrame
        All geometries in gdf are passed to 'how'.
    how : str
        Shapely object function like equals, almost_equals,
        contains, crosses, disjoint, intersects, touches, within.

    Returns
    -------
    bool
        True if any call of function 'how' is True.

    """
    for g in gdf.geometry:
        method_to_call = getattr(geom_test, how)
        result = method_to_call(g)
        if result:  # Return once the first result is True
            return True
    return False