We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Make `LXMLMixin.lxmlize` use scraper's `session`, rather than a raw `request.get()`
Otherwise it slows down `--fast` scrapes because it doesn't use cached responses.

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `openstates/utils/lxmlize.py`
Content:
```
1 import requests
2 import lxml.html
3 
4 
5 class LXMLMixin(object):
6     """Mixin for adding LXML helper functions to Open States code."""
7 
8     def lxmlize(self, url, raise_exceptions=False):
9         """Parses document into an LXML object and makes links absolute.
10 
11         Args:
12             url (str): URL of the document to parse.
13         Returns:
14             Element: Document node representing the page.
15         """
16         try:
17             response = requests.get(url)
18         except requests.exceptions.SSLError:
19             self.warning('`self.lxmlize()` failed due to SSL error, trying'\
20                 'an unverified `requests.get()`')
21             response = requests.get(url, verify=False)
22 
23         if raise_exceptions:
24             response.raise_for_status()
25 
26         page = lxml.html.fromstring(response.text)
27         page.make_links_absolute(url)
28 
29         return page
30 
31     def get_node(self, base_node, xpath_query):
32         """Searches for node in an element tree.
33 
34         Attempts to return only the first node found for an xpath query. Meant
35         to cut down on exception handling boilerplate.
36 
37         Args:
38             base_node (Element): Document node to begin querying from.
39             xpath_query (str): XPath query to define nodes to search for.
40         Returns:
41             Element: First node found that matches the query.
42         """
43         try:
44             node = base_node.xpath(xpath_query)[0]
45         except IndexError:
46             node = None
47 
48         return node
49 
50     def get_nodes(self, base_node, xpath_query):
51         """Searches for nodes in an element tree.
52 
53         Attempts to return all nodes found for an xpath query. Meant to cut
54         down on exception handling boilerplate.
55 
56         Args:
57             base_node (Element): Document node to begin querying from.
58             xpath_query (str): Xpath query to define nodes to search for.
59         Returns:
60             List[Element]: All nodes found that match the query.
61         """
62         return base_node.xpath(xpath_query)
63
```
--- 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()

```

diff --git a/openstates/utils/lxmlize.py b/openstates/utils/lxmlize.py
--- a/openstates/utils/lxmlize.py
+++ b/openstates/utils/lxmlize.py
@@ -14,11 +14,13 @@
             Element: Document node representing the page.
         """
         try:
-            response = requests.get(url)
+            # This class is always mixed into subclasses of `billy.Scraper`,
+            # which have a `get` method defined.
+            response = self.get(url)
         except requests.exceptions.SSLError:
             self.warning('`self.lxmlize()` failed due to SSL error, trying'\
-                'an unverified `requests.get()`')
-            response = requests.get(url, verify=False)
+                'an unverified `self.get()` (i.e. `requests.get()`)')
+            response = self.get(url, verify=False)
 
         if raise_exceptions:
             response.raise_for_status()

{"golden_diff": "diff --git a/openstates/utils/lxmlize.py b/openstates/utils/lxmlize.py\n--- a/openstates/utils/lxmlize.py\n+++ b/openstates/utils/lxmlize.py\n@@ -14,11 +14,13 @@\n             Element: Document node representing the page.\n         \"\"\"\n         try:\n-            response = requests.get(url)\n+            # This class is always mixed into subclasses of `billy.Scraper`,\n+            # which have a `get` method defined.\n+            response = self.get(url)\n         except requests.exceptions.SSLError:\n             self.warning('`self.lxmlize()` failed due to SSL error, trying'\\\n-                'an unverified `requests.get()`')\n-            response = requests.get(url, verify=False)\n+                'an unverified `self.get()` (i.e. `requests.get()`)')\n+            response = self.get(url, verify=False)\n \n         if raise_exceptions:\n             response.raise_for_status()\n", "issue": "Make `LXMLMixin.lxmlize` use scraper's `session`, rather than a raw `request.get()`\nOtherwise it slows down `--fast` scrapes because it doesn't use cached responses.\n", "before_files": [{"content": "import requests\nimport lxml.html\n\n\nclass LXMLMixin(object):\n    \"\"\"Mixin for adding LXML helper functions to Open States code.\"\"\"\n\n    def lxmlize(self, url, raise_exceptions=False):\n        \"\"\"Parses document into an LXML object and makes links absolute.\n\n        Args:\n            url (str): URL of the document to parse.\n        Returns:\n            Element: Document node representing the page.\n        \"\"\"\n        try:\n            response = requests.get(url)\n        except requests.exceptions.SSLError:\n            self.warning('`self.lxmlize()` failed due to SSL error, trying'\\\n                'an unverified `requests.get()`')\n            response = requests.get(url, verify=False)\n\n        if raise_exceptions:\n            response.raise_for_status()\n\n        page = lxml.html.fromstring(response.text)\n        page.make_links_absolute(url)\n\n        return page\n\n    def get_node(self, base_node, xpath_query):\n        \"\"\"Searches for node in an element tree.\n\n        Attempts to return only the first node found for an xpath query. Meant\n        to cut down on exception handling boilerplate.\n\n        Args:\n            base_node (Element): Document node to begin querying from.\n            xpath_query (str): XPath query to define nodes to search for.\n        Returns:\n            Element: First node found that matches the query.\n        \"\"\"\n        try:\n            node = base_node.xpath(xpath_query)[0]\n        except IndexError:\n            node = None\n\n        return node\n\n    def get_nodes(self, base_node, xpath_query):\n        \"\"\"Searches for nodes in an element tree.\n\n        Attempts to return all nodes found for an xpath query. Meant to cut\n        down on exception handling boilerplate.\n\n        Args:\n            base_node (Element): Document node to begin querying from.\n            xpath_query (str): Xpath query to define nodes to search for.\n        Returns:\n            List[Element]: All nodes found that match the query.\n        \"\"\"\n        return base_node.xpath(xpath_query)\n", "path": "openstates/utils/lxmlize.py"}], "after_files": [{"content": "import requests\nimport lxml.html\n\n\nclass LXMLMixin(object):\n    \"\"\"Mixin for adding LXML helper functions to Open States code.\"\"\"\n\n    def lxmlize(self, url, raise_exceptions=False):\n        \"\"\"Parses document into an LXML object and makes links absolute.\n\n        Args:\n            url (str): URL of the document to parse.\n        Returns:\n            Element: Document node representing the page.\n        \"\"\"\n        try:\n            # This class is always mixed into subclasses of `billy.Scraper`,\n            # which have a `get` method defined.\n            response = self.get(url)\n        except requests.exceptions.SSLError:\n            self.warning('`self.lxmlize()` failed due to SSL error, trying'\\\n                'an unverified `self.get()` (i.e. `requests.get()`)')\n            response = self.get(url, verify=False)\n\n        if raise_exceptions:\n            response.raise_for_status()\n\n        page = lxml.html.fromstring(response.text)\n        page.make_links_absolute(url)\n\n        return page\n\n    def get_node(self, base_node, xpath_query):\n        \"\"\"Searches for node in an element tree.\n\n        Attempts to return only the first node found for an xpath query. Meant\n        to cut down on exception handling boilerplate.\n\n        Args:\n            base_node (Element): Document node to begin querying from.\n            xpath_query (str): XPath query to define nodes to search for.\n        Returns:\n            Element: First node found that matches the query.\n        \"\"\"\n        try:\n            node = base_node.xpath(xpath_query)[0]\n        except IndexError:\n            node = None\n\n        return node\n\n    def get_nodes(self, base_node, xpath_query):\n        \"\"\"Searches for nodes in an element tree.\n\n        Attempts to return all nodes found for an xpath query. Meant to cut\n        down on exception handling boilerplate.\n\n        Args:\n            base_node (Element): Document node to begin querying from.\n            xpath_query (str): Xpath query to define nodes to search for.\n        Returns:\n            List[Element]: All nodes found that match the query.\n        \"\"\"\n        return base_node.xpath(xpath_query)\n", "path": "openstates/utils/lxmlize.py"}]}