prompt: We are currently solving the following issue within our repository. Here is the issue text:
  --- BEGIN ISSUE ---
  [BUG] cElementTree has been deprecated and will be removed in favor of ElementTree
  Reference : https://bugs.python.org/issue36543
  
  ```
  bokeh/sampledata/us_states.py
  33:import xml.etree.cElementTree as et
  
  bokeh/sampledata/us_counties.py
  40:import xml.etree.cElementTree as et
  ```
  
  
  --- END ISSUE ---
  
  Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
  --- BEGIN FILES ---
  Path: `bokeh/sampledata/us_counties.py`
  Content:
  ```
  1 #-----------------------------------------------------------------------------
  2 # Copyright (c) 2012 - 2020, Anaconda, Inc., and Bokeh Contributors.
  3 # All rights reserved.
  4 #
  5 # The full license is in the file LICENSE.txt, distributed with this software.
  6 #-----------------------------------------------------------------------------
  7 ''' This modules exposes geometry data for Unites States. It exposes a
  8 dictionary ``data``, which is indexed by the two-tuples:
  9 
  10 .. code-block:: python
  11 
  12     (state_id, county_id)
  13 
  14 that have the following dictionaries as the associated value:
  15 
  16 .. code-block:: python
  17 
  18     data[(1,1)]['name']
  19     data[(1,1)]['state']
  20     data[(1,1)]['detailed name']
  21     data[(1,1)]['lats']
  22     data[(1,1)]['lons']
  23 
  24 Entries for ``'name'`` can have duplicates for certain states (e.g. Virginia).
  25 The combination of ``'detailed name'`` and ``'state'`` will always be unique.
  26 
  27 '''
  28 #-----------------------------------------------------------------------------
  29 # Boilerplate
  30 #-----------------------------------------------------------------------------
  31 import logging # isort:skip
  32 log = logging.getLogger(__name__)
  33 
  34 #-----------------------------------------------------------------------------
  35 # Imports
  36 #-----------------------------------------------------------------------------
  37 
  38 # Standard library imports
  39 import csv
  40 import xml.etree.cElementTree as et
  41 
  42 # Bokeh imports
  43 from ..util.sampledata import external_path, open_csv
  44 
  45 #-----------------------------------------------------------------------------
  46 # Globals and constants
  47 #-----------------------------------------------------------------------------
  48 
  49 __all__ = (
  50     'data',
  51 )
  52 
  53 #-----------------------------------------------------------------------------
  54 # General API
  55 #-----------------------------------------------------------------------------
  56 
  57 #-----------------------------------------------------------------------------
  58 # Dev API
  59 #-----------------------------------------------------------------------------
  60 
  61 #-----------------------------------------------------------------------------
  62 # Private API
  63 #-----------------------------------------------------------------------------
  64 
  65 def _read_data():
  66     '''
  67 
  68     '''
  69     nan = float('NaN')
  70 
  71     data = {}
  72 
  73     with open_csv(external_path('US_Counties.csv')) as f:
  74         next(f)
  75         reader = csv.reader(f, delimiter=str(','), quotechar=str('"'))
  76         for row in reader:
  77             name, dummy, state, dummy, geometry, dummy, dummy, dummy, det_name, state_id, county_id, dummy, dummy = row
  78             xml = et.fromstring(geometry)
  79             lats = []
  80             lons = []
  81             for i, poly in enumerate(xml.findall('.//outerBoundaryIs/LinearRing/coordinates')):
  82                 if i > 0:
  83                     lats.append(nan)
  84                     lons.append(nan)
  85                 coords = (c.split(',')[:2] for c in poly.text.split())
  86                 lat, lon = list(zip(*[(float(lat), float(lon)) for lon, lat in
  87                     coords]))
  88                 lats.extend(lat)
  89                 lons.extend(lon)
  90             data[(int(state_id), int(county_id))] = {
  91                 'name' : name,
  92                 'detailed name' : det_name,
  93                 'state' : state,
  94                 'lats' : lats,
  95                 'lons' : lons,
  96             }
  97 
  98     return data
  99 
  100 #-----------------------------------------------------------------------------
  101 # Code
  102 #-----------------------------------------------------------------------------
  103 
  104 data = _read_data()
  105
  ```
  
  Path: `bokeh/sampledata/us_states.py`
  Content:
  ```
  1 #-----------------------------------------------------------------------------
  2 # Copyright (c) 2012 - 2020, Anaconda, Inc., and Bokeh Contributors.
  3 # All rights reserved.
  4 #
  5 # The full license is in the file LICENSE.txt, distributed with this software.
  6 #-----------------------------------------------------------------------------
  7 '''
  8 This modules exposes geometry data for Unites States. It exposes a dictionary 'data' which is
  9 indexed by the two letter state code (e.g., 'CA', 'TX') and has the following dictionary as the
  10 associated value:
  11 
  12     data['CA']['name']
  13     data['CA']['region']
  14     data['CA']['lats']
  15     data['CA']['lons']
  16 
  17 '''
  18 
  19 #-----------------------------------------------------------------------------
  20 # Boilerplate
  21 #-----------------------------------------------------------------------------
  22 import logging # isort:skip
  23 log = logging.getLogger(__name__)
  24 
  25 #-----------------------------------------------------------------------------
  26 # Imports
  27 #-----------------------------------------------------------------------------
  28 
  29 # Standard library imports
  30 import codecs
  31 import csv
  32 import gzip
  33 import xml.etree.cElementTree as et
  34 
  35 # Bokeh imports
  36 from ..util.sampledata import package_path
  37 
  38 #-----------------------------------------------------------------------------
  39 # Globals and constants
  40 #-----------------------------------------------------------------------------
  41 
  42 __all__ = (
  43     'data',
  44 )
  45 
  46 #-----------------------------------------------------------------------------
  47 # General API
  48 #-----------------------------------------------------------------------------
  49 
  50 #-----------------------------------------------------------------------------
  51 # Dev API
  52 #-----------------------------------------------------------------------------
  53 
  54 #-----------------------------------------------------------------------------
  55 # Private API
  56 #-----------------------------------------------------------------------------
  57 
  58 def _read_data():
  59     '''
  60 
  61     '''
  62     nan = float('NaN')
  63 
  64     data = {}
  65 
  66     with gzip.open(package_path('US_Regions_State_Boundaries.csv.gz')) as f:
  67         decoded = codecs.iterdecode(f, "utf-8")
  68         next(decoded)
  69         reader = csv.reader(decoded, delimiter=str(','), quotechar=str('"'))
  70         for row in reader:
  71             region, name, code, geometry, dummy = row
  72             xml = et.fromstring(geometry)
  73             lats = []
  74             lons = []
  75             for i, poly in enumerate(xml.findall('.//outerBoundaryIs/LinearRing/coordinates')):
  76                 if i > 0:
  77                     lats.append(nan)
  78                     lons.append(nan)
  79                 coords = (c.split(',')[:2] for c in poly.text.split())
  80                 lat, lon = list(zip(*[(float(lat), float(lon)) for lon, lat in
  81                     coords]))
  82                 lats.extend(lat)
  83                 lons.extend(lon)
  84             data[code] = {
  85                 'name'   : name,
  86                 'region' : region,
  87                 'lats'   : lats,
  88                 'lons'   : lons,
  89             }
  90 
  91     return data
  92 
  93 #-----------------------------------------------------------------------------
  94 # Code
  95 #-----------------------------------------------------------------------------
  96 
  97 data = _read_data()
  98
  ```
  --- END FILES ---
  
  Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.
  
  Here is an example:
  
  ```diff
  diff --git a/examples/server_async.py b/examples/server_async.py
  --- a/examples/server_async.py
  +++ b/examples/server_async.py
  @@ -313,4 +313,4 @@
   
   
   if __name__ == "__main__":
  -    asyncio.run(run_async_server("."), debug=True)
  +    asyncio.run(run_async_server(), debug=True)
  diff --git a/examples/server_sync.py b/examples/server_sync.py
  --- a/examples/server_sync.py
  +++ b/examples/server_sync.py
  @@ -313,5 +313,5 @@
   
   
   if __name__ == "__main__":
  -    server = run_sync_server(".")
  +    server = run_sync_server()
       server.shutdown()
  
  ```
  
golden_diff: diff --git a/bokeh/sampledata/us_counties.py b/bokeh/sampledata/us_counties.py
  --- a/bokeh/sampledata/us_counties.py
  +++ b/bokeh/sampledata/us_counties.py
  @@ -37,7 +37,7 @@
   
   # Standard library imports
   import csv
  -import xml.etree.cElementTree as et
  +import xml.etree.ElementTree as et
   
   # Bokeh imports
   from ..util.sampledata import external_path, open_csv
  diff --git a/bokeh/sampledata/us_states.py b/bokeh/sampledata/us_states.py
  --- a/bokeh/sampledata/us_states.py
  +++ b/bokeh/sampledata/us_states.py
  @@ -30,7 +30,7 @@
   import codecs
   import csv
   import gzip
  -import xml.etree.cElementTree as et
  +import xml.etree.ElementTree as et
   
   # Bokeh imports
   from ..util.sampledata import package_path
  
verification_info: {"golden_diff": "diff --git a/bokeh/sampledata/us_counties.py b/bokeh/sampledata/us_counties.py\n--- a/bokeh/sampledata/us_counties.py\n+++ b/bokeh/sampledata/us_counties.py\n@@ -37,7 +37,7 @@\n \n # Standard library imports\n import csv\n-import xml.etree.cElementTree as et\n+import xml.etree.ElementTree as et\n \n # Bokeh imports\n from ..util.sampledata import external_path, open_csv\ndiff --git a/bokeh/sampledata/us_states.py b/bokeh/sampledata/us_states.py\n--- a/bokeh/sampledata/us_states.py\n+++ b/bokeh/sampledata/us_states.py\n@@ -30,7 +30,7 @@\n import codecs\n import csv\n import gzip\n-import xml.etree.cElementTree as et\n+import xml.etree.ElementTree as et\n \n # Bokeh imports\n from ..util.sampledata import package_path\n", "issue": "[BUG] cElementTree has been deprecated and will be removed in favor of ElementTree\nReference : https://bugs.python.org/issue36543\r\n\r\n```\r\nbokeh/sampledata/us_states.py\r\n33:import xml.etree.cElementTree as et\r\n\r\nbokeh/sampledata/us_counties.py\r\n40:import xml.etree.cElementTree as et\r\n```\r\n\n", "before_files": [{"content": "#-----------------------------------------------------------------------------\n# Copyright (c) 2012 - 2020, Anaconda, Inc., and Bokeh Contributors.\n# All rights reserved.\n#\n# The full license is in the file LICENSE.txt, distributed with this software.\n#-----------------------------------------------------------------------------\n''' This modules exposes geometry data for Unites States. It exposes a\ndictionary ``data``, which is indexed by the two-tuples:\n\n.. code-block:: python\n\n    (state_id, county_id)\n\nthat have the following dictionaries as the associated value:\n\n.. code-block:: python\n\n    data[(1,1)]['name']\n    data[(1,1)]['state']\n    data[(1,1)]['detailed name']\n    data[(1,1)]['lats']\n    data[(1,1)]['lons']\n\nEntries for ``'name'`` can have duplicates for certain states (e.g. Virginia).\nThe combination of ``'detailed name'`` and ``'state'`` will always be unique.\n\n'''\n#-----------------------------------------------------------------------------\n# Boilerplate\n#-----------------------------------------------------------------------------\nimport logging # isort:skip\nlog = logging.getLogger(__name__)\n\n#-----------------------------------------------------------------------------\n# Imports\n#-----------------------------------------------------------------------------\n\n# Standard library imports\nimport csv\nimport xml.etree.cElementTree as et\n\n# Bokeh imports\nfrom ..util.sampledata import external_path, open_csv\n\n#-----------------------------------------------------------------------------\n# Globals and constants\n#-----------------------------------------------------------------------------\n\n__all__ = (\n    'data',\n)\n\n#-----------------------------------------------------------------------------\n# General API\n#-----------------------------------------------------------------------------\n\n#-----------------------------------------------------------------------------\n# Dev API\n#-----------------------------------------------------------------------------\n\n#-----------------------------------------------------------------------------\n# Private API\n#-----------------------------------------------------------------------------\n\ndef _read_data():\n    '''\n\n    '''\n    nan = float('NaN')\n\n    data = {}\n\n    with open_csv(external_path('US_Counties.csv')) as f:\n        next(f)\n        reader = csv.reader(f, delimiter=str(','), quotechar=str('\"'))\n        for row in reader:\n            name, dummy, state, dummy, geometry, dummy, dummy, dummy, det_name, state_id, county_id, dummy, dummy = row\n            xml = et.fromstring(geometry)\n            lats = []\n            lons = []\n            for i, poly in enumerate(xml.findall('.//outerBoundaryIs/LinearRing/coordinates')):\n                if i > 0:\n                    lats.append(nan)\n                    lons.append(nan)\n                coords = (c.split(',')[:2] for c in poly.text.split())\n                lat, lon = list(zip(*[(float(lat), float(lon)) for lon, lat in\n                    coords]))\n                lats.extend(lat)\n                lons.extend(lon)\n            data[(int(state_id), int(county_id))] = {\n                'name' : name,\n                'detailed name' : det_name,\n                'state' : state,\n                'lats' : lats,\n                'lons' : lons,\n            }\n\n    return data\n\n#-----------------------------------------------------------------------------\n# Code\n#-----------------------------------------------------------------------------\n\ndata = _read_data()\n", "path": "bokeh/sampledata/us_counties.py"}, {"content": "#-----------------------------------------------------------------------------\n# Copyright (c) 2012 - 2020, Anaconda, Inc., and Bokeh Contributors.\n# All rights reserved.\n#\n# The full license is in the file LICENSE.txt, distributed with this software.\n#-----------------------------------------------------------------------------\n'''\nThis modules exposes geometry data for Unites States. It exposes a dictionary 'data' which is\nindexed by the two letter state code (e.g., 'CA', 'TX') and has the following dictionary as the\nassociated value:\n\n    data['CA']['name']\n    data['CA']['region']\n    data['CA']['lats']\n    data['CA']['lons']\n\n'''\n\n#-----------------------------------------------------------------------------\n# Boilerplate\n#-----------------------------------------------------------------------------\nimport logging # isort:skip\nlog = logging.getLogger(__name__)\n\n#-----------------------------------------------------------------------------\n# Imports\n#-----------------------------------------------------------------------------\n\n# Standard library imports\nimport codecs\nimport csv\nimport gzip\nimport xml.etree.cElementTree as et\n\n# Bokeh imports\nfrom ..util.sampledata import package_path\n\n#-----------------------------------------------------------------------------\n# Globals and constants\n#-----------------------------------------------------------------------------\n\n__all__ = (\n    'data',\n)\n\n#-----------------------------------------------------------------------------\n# General API\n#-----------------------------------------------------------------------------\n\n#-----------------------------------------------------------------------------\n# Dev API\n#-----------------------------------------------------------------------------\n\n#-----------------------------------------------------------------------------\n# Private API\n#-----------------------------------------------------------------------------\n\ndef _read_data():\n    '''\n\n    '''\n    nan = float('NaN')\n\n    data = {}\n\n    with gzip.open(package_path('US_Regions_State_Boundaries.csv.gz')) as f:\n        decoded = codecs.iterdecode(f, \"utf-8\")\n        next(decoded)\n        reader = csv.reader(decoded, delimiter=str(','), quotechar=str('\"'))\n        for row in reader:\n            region, name, code, geometry, dummy = row\n            xml = et.fromstring(geometry)\n            lats = []\n            lons = []\n            for i, poly in enumerate(xml.findall('.//outerBoundaryIs/LinearRing/coordinates')):\n                if i > 0:\n                    lats.append(nan)\n                    lons.append(nan)\n                coords = (c.split(',')[:2] for c in poly.text.split())\n                lat, lon = list(zip(*[(float(lat), float(lon)) for lon, lat in\n                    coords]))\n                lats.extend(lat)\n                lons.extend(lon)\n            data[code] = {\n                'name'   : name,\n                'region' : region,\n                'lats'   : lats,\n                'lons'   : lons,\n            }\n\n    return data\n\n#-----------------------------------------------------------------------------\n# Code\n#-----------------------------------------------------------------------------\n\ndata = _read_data()\n", "path": "bokeh/sampledata/us_states.py"}], "after_files": [{"content": "#-----------------------------------------------------------------------------\n# Copyright (c) 2012 - 2020, Anaconda, Inc., and Bokeh Contributors.\n# All rights reserved.\n#\n# The full license is in the file LICENSE.txt, distributed with this software.\n#-----------------------------------------------------------------------------\n''' This modules exposes geometry data for Unites States. It exposes a\ndictionary ``data``, which is indexed by the two-tuples:\n\n.. code-block:: python\n\n    (state_id, county_id)\n\nthat have the following dictionaries as the associated value:\n\n.. code-block:: python\n\n    data[(1,1)]['name']\n    data[(1,1)]['state']\n    data[(1,1)]['detailed name']\n    data[(1,1)]['lats']\n    data[(1,1)]['lons']\n\nEntries for ``'name'`` can have duplicates for certain states (e.g. Virginia).\nThe combination of ``'detailed name'`` and ``'state'`` will always be unique.\n\n'''\n#-----------------------------------------------------------------------------\n# Boilerplate\n#-----------------------------------------------------------------------------\nimport logging # isort:skip\nlog = logging.getLogger(__name__)\n\n#-----------------------------------------------------------------------------\n# Imports\n#-----------------------------------------------------------------------------\n\n# Standard library imports\nimport csv\nimport xml.etree.ElementTree as et\n\n# Bokeh imports\nfrom ..util.sampledata import external_path, open_csv\n\n#-----------------------------------------------------------------------------\n# Globals and constants\n#-----------------------------------------------------------------------------\n\n__all__ = (\n    'data',\n)\n\n#-----------------------------------------------------------------------------\n# General API\n#-----------------------------------------------------------------------------\n\n#-----------------------------------------------------------------------------\n# Dev API\n#-----------------------------------------------------------------------------\n\n#-----------------------------------------------------------------------------\n# Private API\n#-----------------------------------------------------------------------------\n\ndef _read_data():\n    '''\n\n    '''\n    nan = float('NaN')\n\n    data = {}\n\n    with open_csv(external_path('US_Counties.csv')) as f:\n        next(f)\n        reader = csv.reader(f, delimiter=str(','), quotechar=str('\"'))\n        for row in reader:\n            name, dummy, state, dummy, geometry, dummy, dummy, dummy, det_name, state_id, county_id, dummy, dummy = row\n            xml = et.fromstring(geometry)\n            lats = []\n            lons = []\n            for i, poly in enumerate(xml.findall('.//outerBoundaryIs/LinearRing/coordinates')):\n                if i > 0:\n                    lats.append(nan)\n                    lons.append(nan)\n                coords = (c.split(',')[:2] for c in poly.text.split())\n                lat, lon = list(zip(*[(float(lat), float(lon)) for lon, lat in\n                    coords]))\n                lats.extend(lat)\n                lons.extend(lon)\n            data[(int(state_id), int(county_id))] = {\n                'name' : name,\n                'detailed name' : det_name,\n                'state' : state,\n                'lats' : lats,\n                'lons' : lons,\n            }\n\n    return data\n\n#-----------------------------------------------------------------------------\n# Code\n#-----------------------------------------------------------------------------\n\ndata = _read_data()\n", "path": "bokeh/sampledata/us_counties.py"}, {"content": "#-----------------------------------------------------------------------------\n# Copyright (c) 2012 - 2020, Anaconda, Inc., and Bokeh Contributors.\n# All rights reserved.\n#\n# The full license is in the file LICENSE.txt, distributed with this software.\n#-----------------------------------------------------------------------------\n'''\nThis modules exposes geometry data for Unites States. It exposes a dictionary 'data' which is\nindexed by the two letter state code (e.g., 'CA', 'TX') and has the following dictionary as the\nassociated value:\n\n    data['CA']['name']\n    data['CA']['region']\n    data['CA']['lats']\n    data['CA']['lons']\n\n'''\n\n#-----------------------------------------------------------------------------\n# Boilerplate\n#-----------------------------------------------------------------------------\nimport logging # isort:skip\nlog = logging.getLogger(__name__)\n\n#-----------------------------------------------------------------------------\n# Imports\n#-----------------------------------------------------------------------------\n\n# Standard library imports\nimport codecs\nimport csv\nimport gzip\nimport xml.etree.ElementTree as et\n\n# Bokeh imports\nfrom ..util.sampledata import package_path\n\n#-----------------------------------------------------------------------------\n# Globals and constants\n#-----------------------------------------------------------------------------\n\n__all__ = (\n    'data',\n)\n\n#-----------------------------------------------------------------------------\n# General API\n#-----------------------------------------------------------------------------\n\n#-----------------------------------------------------------------------------\n# Dev API\n#-----------------------------------------------------------------------------\n\n#-----------------------------------------------------------------------------\n# Private API\n#-----------------------------------------------------------------------------\n\ndef _read_data():\n    '''\n\n    '''\n    nan = float('NaN')\n\n    data = {}\n\n    with gzip.open(package_path('US_Regions_State_Boundaries.csv.gz')) as f:\n        decoded = codecs.iterdecode(f, \"utf-8\")\n        next(decoded)\n        reader = csv.reader(decoded, delimiter=str(','), quotechar=str('\"'))\n        for row in reader:\n            region, name, code, geometry, dummy = row\n            xml = et.fromstring(geometry)\n            lats = []\n            lons = []\n            for i, poly in enumerate(xml.findall('.//outerBoundaryIs/LinearRing/coordinates')):\n                if i > 0:\n                    lats.append(nan)\n                    lons.append(nan)\n                coords = (c.split(',')[:2] for c in poly.text.split())\n                lat, lon = list(zip(*[(float(lat), float(lon)) for lon, lat in\n                    coords]))\n                lats.extend(lat)\n                lons.extend(lon)\n            data[code] = {\n                'name'   : name,\n                'region' : region,\n                'lats'   : lats,\n                'lons'   : lons,\n            }\n\n    return data\n\n#-----------------------------------------------------------------------------\n# Code\n#-----------------------------------------------------------------------------\n\ndata = _read_data()\n", "path": "bokeh/sampledata/us_states.py"}]}