code: def _read_data() -> dict[State, StateData]:
      """ """
      data: dict[State, StateData] = {}
  
      with gzip.open(
          package_path("US_Regions_State_Boundaries.csv.gz")
      ) as f:
          decoded = codecs.iterdecode(f, "utf-8")
          next(decoded)
          reader = csv.reader(decoded, delimiter=",", quotechar='"')
          for row in reader:
              region, name, code, geometry, _ = row
              xml = et.fromstring(geometry)
              lats: list[float] = []
              lons: list[float] = []
              for i, poly in enumerate(
                  xml.findall(
                      ".//outerBoundaryIs/LinearRing/coordinates"
                  )
              ):
                  if i > 0:
                      lats.append(nan)
                      lons.append(nan)
                  assert isinstance(poly.text, str)
                  coords = (c.split(",")[:2] for c in poly.text.split())
                  lat, lon = list(
                      zip(
                          *[
                              (float(lat), float(lon))
                              for lon, lat in coords
                          ]
                      )
                  )
                  lats.extend(lat)
                  lons.extend(lon)
              data[code] = StateData(
                  name=name,
                  region=region,
                  lats=np.array(lats),
                  lons=np.array(lons),
              )
  
      return data
  
file_path: bokeh/src/bokeh/sampledata/us_states.py
imports: from __future__ import annotations
  import logging
  import codecs
  import csv
  import gzip
  import xml.etree.ElementTree
  from math import nan
  from typing import TYPE_CHECKING, TypedDict
  import numpy
  from ..util.sampledata import package_path
label_desc: Use image node_id 1 for calling a global function with example usage: _read_data() and returns: data