def METHOD_NAME(mapset_path):
    """Split mapset path to three parts - grassdb, location, mapset"""
    mapset_path = Path(mapset_path)
    if len(mapset_path.parts) < 3:
        ValueError(
            _("Mapset path '{}' needs at least three components").format(mapset_path)
        )
    mapset = mapset_path.name
    location_path = mapset_path.parent
    location = location_path.name
    grassdb = location_path.parent
    return os.fspath(grassdb), location, mapset