def calc_s2id(lat, lng, level): s2id = Cell.from_lat_lng(LatLng(lat, lng)).id().parent(level).id() return f"{s2id:016x}"