def _quadrat_cut_geometry(geom: Polygon | MultiPolygon, quadrat_width: float) -> MultiPolygon:
    """
    Split a Polygon or MultiPolygon up into sub-polygons of a specified size.

    Parameters
    ----------
    geom
        The geometry to split up into smaller sub-polygons.
    quadrat_width
        Width (in geometry's units) of quadrat squares with which to split up
        the geometry.

    Returns
    -------
    geom
        The resulting split-up geometry.
    """
    # min number of dividing lines (3 produces a grid of 4 quadrat squares)
    min_num = 3

    # create n evenly spaced points between the min and max x and y bounds
    left, bottom, right, top = geom.bounds
    x_num = int(np.ceil((right - left) / quadrat_width) + 1)
    y_num = int(np.ceil((top - bottom) / quadrat_width) + 1)
    x_points = np.linspace(left, right, num=max(x_num, min_num))
    y_points = np.linspace(bottom, top, num=max(y_num, min_num))

    # create a quadrat grid of lines at each of the evenly spaced points
    vertical_lines = [LineString([(x, y_points[0]), (x, y_points[-1])]) for x in x_points]
    horizont_lines = [LineString([(x_points[0], y), (x_points[-1], y)]) for y in y_points]
    lines = vertical_lines + horizont_lines

    # recursively split the geometry by each quadrat line
    geoms = [geom]
    for line in lines:
        # split polygon by line if they intersect, otherwise just keep it
        split_geoms = [split(g, line).geoms if g.intersects(line) else [g] for g in geoms]
        # now flatten the list and process these split geoms on the next line in the list of lines
        geoms = [g for g_list in split_geoms for g in g_list]

    return MultiPolygon(geoms)

    Split a Polygon or MultiPolygon up into sub-polygons of a specified size.

    Parameters
    ----------
    geom
        The geometry to split up into smaller sub-polygons.
    quadrat_width
        Width (in geometry's units) of quadrat squares with which to split up
        the geometry.

    Returns
    -------
    geom
        The resulting split-up geometry.
    
osmnx/utils_geo.py