def METHOD_NAME(
    self,
    limit: int | None = DEFAULT_LIMIT_READ,
    include_global: bool = False,
) -> SpaceList:
    """`List spaces <https://developer.cognite.com/api#tag/Spaces/operation/listSpacesV3>`_
    Args:
        limit (int | None): Maximum number of spaces to return. Defaults to 10. Set to -1, float("inf") or None to return all items.
        include_global (bool): Whether to include global spaces. Defaults to False.
    Returns:
        SpaceList: List of requested spaces
    Examples:
        List spaces and filter on max start time::
            >>> from cognite.client import CogniteClient
            >>> c = CogniteClient()
            >>> space_list = c.data_modeling.spaces.list(limit=5)
        Iterate over spaces::
            >>> from cognite.client import CogniteClient
            >>> c = CogniteClient()
            >>> for space in c.data_modeling.spaces:
            ...     space # do something with the space
        Iterate over chunks of spaces to reduce memory load::
            >>> from cognite.client import CogniteClient
            >>> c = CogniteClient()
            >>> for space_list in c.data_modeling.spaces(chunk_size=2500):
            ...     space_list # do something with the spaces
    """
    return self._list(
        list_cls=SpaceList,
        resource_cls=Space,
        method="GET",
        limit=limit,
        other_params={"includeGlobal": include_global},
    )