We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
recent changes break MKS937B check_set_errors
It was previously ok that `check_errors` returns `None` (or nothing) as for example in [MKS937B](https://github.com/pymeasure/pymeasure/blob/68f5487b0837e9f3c5debd144a7ddfeb7bddf3e5/pymeasure/instruments/mksinst/mks937b.py#L150).

Recently it got mandatory that the `check_set_errors` and `check_get_errors` return lists. This is correctly documented and some existing devices were also changed -> 1214d32.
`MKS937B` it seems was overlooked. 

https://github.com/pymeasure/pymeasure/blob/68f5487b0837e9f3c5debd144a7ddfeb7bddf3e5/pymeasure/instruments/mksinst/mks937b.py#L150-L162

Is the only change needed here to return an empty list upon no error?


--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `pymeasure/instruments/mksinst/mks937b.py`
Content:
```
1 #
2 # This file is part of the PyMeasure package.
3 #
4 # Copyright (c) 2013-2023 PyMeasure Developers
5 #
6 # Permission is hereby granted, free of charge, to any person obtaining a copy
7 # of this software and associated documentation files (the "Software"), to deal
8 # in the Software without restriction, including without limitation the rights
9 # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 # copies of the Software, and to permit persons to whom the Software is
11 # furnished to do so, subject to the following conditions:
12 #
13 # The above copyright notice and this permission notice shall be included in
14 # all copies or substantial portions of the Software.
15 #
16 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 # THE SOFTWARE.
23 #
24 
25 import re
26 
27 from pymeasure.instruments import Channel, Instrument
28 from pymeasure.instruments.validators import strict_discrete_set
29 
30 
31 _ion_gauge_status = {"Wait": "W",
32                      "Off": "O",
33                      "Protect": "P",
34                      "Degas": "D",
35                      "Control": "C",
36                      "Rear panel Ctrl off": "R",
37                      "HC filament fault": "H",
38                      "No gauge": "N",
39                      "Good": "G",
40                      "NOT_IONGAUGE": "NAK152",
41                      "INVALID COMMAND": "NAK160",
42                      }
43 
44 
45 class PressureChannel(Channel):
46     pressure = Channel.measurement(
47         "PR{ch}?", """ Pressure on the channel in units selected on the device""",
48     )
49 
50     power_enabled = Channel.control(
51         "CP{ch}?", "CP{ch}!%s",
52         """Power status of the channel""",
53         validator=strict_discrete_set,
54         map_values=True,
55         values={True: "ON", False: "OFF"},
56         check_set_errors=True,
57     )
58 
59 
60 class IonGaugeAndPressureChannel(PressureChannel):
61     """Channel having both a pressure and an ion gauge sensor"""
62     ion_gauge_status = Channel.measurement(
63         "T{ch}?",
64         """Ion gauge status of the channel""",
65         map_values=True,
66         values=_ion_gauge_status,
67     )
68 
69 
70 class MKS937B(Instrument):
71     """ MKS 937B vacuum gauge controller
72 
73     Connection to the device is made through an RS232/RS485 serial connection.
74     The communication protocol of this device is as follows:
75 
76     Query: '@<aaa><Command>?;FF' with the response '@<aaa>ACK<Response>;FF'
77     Set command: '@<aaa><Command>!<parameter>;FF' with the response '@<aaa>ACK<Response>;FF'
78     Above <aaa> is an address from 001 to 254 which can be specified upon
79     initialization. Since ';FF' is not supported by pyvisa as terminator this
80     class overloads the device communication methods.
81 
82     :param adapter: pyvisa resource name of the instrument or adapter instance
83     :param string name: The name of the instrument.
84     :param address: device address included in every message to the instrument
85                     (default=253)
86     :param kwargs: Any valid key-word argument for Instrument
87     """
88     channels = Instrument.ChannelCreator(
89         (IonGaugeAndPressureChannel, PressureChannel) * 3,
90         ("1", "2", "3", "4", "5", "6"),
91     )  # Channels 1,3,5 have both an ion gauge and a pressure sensor, 2,4,6 only a pressure sensor
92 
93     def __init__(self, adapter, name="MKS 937B vacuum gauge controller", address=253, **kwargs):
94         super().__init__(
95             adapter,
96             name,
97             includeSCPI=False,
98             read_termination=";",  # in reality its ";FF"
99             # which is, however, invalid for pyvisa. Therefore extra bytes have to
100             # be read in the read() method and the terminators are hardcoded here.
101             write_termination=";FF",
102             **kwargs
103         )
104         self.address = address
105         # compiled regular expression for finding numerical values in reply strings
106         self._re_response = re.compile(fr"@{self.address:03d}(?P<ack>ACK)?(?P<msg>.*)")
107 
108     def _extract_reply(self, reply):
109         """ preprocess_reply function which tries to extract <Response> from
110         '@<aaa>ACK<Response>;FF'. If <Response> can not be identified the orignal string
111         is returned.
112         :param reply: reply string
113         :returns: string with only the response, or the original string
114         """
115         rvalue = self._re_response.search(reply)
116         if rvalue:
117             return rvalue.group('msg')
118         return reply
119 
120     def _prepend_address(self, cmd):
121         """
122         create command string by including the device address
123         """
124         return f"@{self.address:03d}{cmd}"
125 
126     def _check_extra_termination(self):
127         """
128         Check the read termination to correspond to the protocol
129         """
130         t = super().read_bytes(2)  # read extra termination chars 'FF'
131         if t != b'FF':
132             raise ValueError(f"unexpected termination string received {t}")
133 
134     def read(self):
135         """
136         Reads from the instrument including the correct termination characters
137         """
138         ret = super().read()
139         self._check_extra_termination()
140         return self._extract_reply(ret)
141 
142     def write(self, command):
143         """
144         Write to the instrument including the device address.
145 
146         :param command: command string to be sent to the instrument
147         """
148         super().write(self._prepend_address(command))
149 
150     def check_set_errors(self):
151         """
152         Check reply string for acknowledgement string.
153         """
154         ret = super().read()  # use super read to get raw reply
155         reply = self._re_response.search(ret)
156         if reply:
157             if reply.group('ack') == 'ACK':
158                 return
159         # no valid acknowledgement message found
160         raise ValueError(f"invalid reply '{ret}' found in check_errors")
161 
162     serial = Instrument.measurement(
163         "SN?", """ Serial number of the instrument """,
164         cast=str,
165     )
166 
167     all_pressures = Instrument.measurement(
168         "PRZ?", """ Read pressures on all channels in selected units """,
169     )
170 
171     combined_pressure1 = Instrument.measurement(
172         "PC1?", """ Read pressure on channel 1 and its combination sensor """,
173     )
174 
175     combined_pressure2 = Instrument.measurement(
176         "PC2?", """ Read pressure on channel 2 and its combination sensor """,
177     )
178 
179     unit = Instrument.control(
180         "U?", "U!%s",
181         """Pressure unit used for all pressure readings from the instrument""",
182         validator=strict_discrete_set,
183         map_values=True,
184         values={"Torr": "TORR",
185                 "mBar": "mBAR",
186                 "Pascal": "PASCAL",
187                 "Micron": "MICRON",
188                 },
189         check_set_errors=True,
190     )
191
```
--- 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/pymeasure/instruments/mksinst/mks937b.py b/pymeasure/instruments/mksinst/mks937b.py
--- a/pymeasure/instruments/mksinst/mks937b.py
+++ b/pymeasure/instruments/mksinst/mks937b.py
@@ -155,7 +155,8 @@
         reply = self._re_response.search(ret)
         if reply:
             if reply.group('ack') == 'ACK':
-                return
+                self._check_extra_termination()
+                return []
         # no valid acknowledgement message found
         raise ValueError(f"invalid reply '{ret}' found in check_errors")

{"golden_diff": "diff --git a/pymeasure/instruments/mksinst/mks937b.py b/pymeasure/instruments/mksinst/mks937b.py\n--- a/pymeasure/instruments/mksinst/mks937b.py\n+++ b/pymeasure/instruments/mksinst/mks937b.py\n@@ -155,7 +155,8 @@\n         reply = self._re_response.search(ret)\n         if reply:\n             if reply.group('ack') == 'ACK':\n-                return\n+                self._check_extra_termination()\n+                return []\n         # no valid acknowledgement message found\n         raise ValueError(f\"invalid reply '{ret}' found in check_errors\")\n", "issue": "recent changes break MKS937B check_set_errors\nIt was previously ok that `check_errors` returns `None` (or nothing) as for example in [MKS937B](https://github.com/pymeasure/pymeasure/blob/68f5487b0837e9f3c5debd144a7ddfeb7bddf3e5/pymeasure/instruments/mksinst/mks937b.py#L150).\r\n\r\nRecently it got mandatory that the `check_set_errors` and `check_get_errors` return lists. This is correctly documented and some existing devices were also changed -> 1214d32.\r\n`MKS937B` it seems was overlooked. \r\n\r\nhttps://github.com/pymeasure/pymeasure/blob/68f5487b0837e9f3c5debd144a7ddfeb7bddf3e5/pymeasure/instruments/mksinst/mks937b.py#L150-L162\r\n\r\nIs the only change needed here to return an empty list upon no error?\r\n\n", "before_files": [{"content": "#\n# This file is part of the PyMeasure package.\n#\n# Copyright (c) 2013-2023 PyMeasure Developers\n#\n# Permission is hereby granted, free of charge, to any person obtaining a copy\n# of this software and associated documentation files (the \"Software\"), to deal\n# in the Software without restriction, including without limitation the rights\n# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n# copies of the Software, and to permit persons to whom the Software is\n# furnished to do so, subject to the following conditions:\n#\n# The above copyright notice and this permission notice shall be included in\n# all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n# THE SOFTWARE.\n#\n\nimport re\n\nfrom pymeasure.instruments import Channel, Instrument\nfrom pymeasure.instruments.validators import strict_discrete_set\n\n\n_ion_gauge_status = {\"Wait\": \"W\",\n                     \"Off\": \"O\",\n                     \"Protect\": \"P\",\n                     \"Degas\": \"D\",\n                     \"Control\": \"C\",\n                     \"Rear panel Ctrl off\": \"R\",\n                     \"HC filament fault\": \"H\",\n                     \"No gauge\": \"N\",\n                     \"Good\": \"G\",\n                     \"NOT_IONGAUGE\": \"NAK152\",\n                     \"INVALID COMMAND\": \"NAK160\",\n                     }\n\n\nclass PressureChannel(Channel):\n    pressure = Channel.measurement(\n        \"PR{ch}?\", \"\"\" Pressure on the channel in units selected on the device\"\"\",\n    )\n\n    power_enabled = Channel.control(\n        \"CP{ch}?\", \"CP{ch}!%s\",\n        \"\"\"Power status of the channel\"\"\",\n        validator=strict_discrete_set,\n        map_values=True,\n        values={True: \"ON\", False: \"OFF\"},\n        check_set_errors=True,\n    )\n\n\nclass IonGaugeAndPressureChannel(PressureChannel):\n    \"\"\"Channel having both a pressure and an ion gauge sensor\"\"\"\n    ion_gauge_status = Channel.measurement(\n        \"T{ch}?\",\n        \"\"\"Ion gauge status of the channel\"\"\",\n        map_values=True,\n        values=_ion_gauge_status,\n    )\n\n\nclass MKS937B(Instrument):\n    \"\"\" MKS 937B vacuum gauge controller\n\n    Connection to the device is made through an RS232/RS485 serial connection.\n    The communication protocol of this device is as follows:\n\n    Query: '@<aaa><Command>?;FF' with the response '@<aaa>ACK<Response>;FF'\n    Set command: '@<aaa><Command>!<parameter>;FF' with the response '@<aaa>ACK<Response>;FF'\n    Above <aaa> is an address from 001 to 254 which can be specified upon\n    initialization. Since ';FF' is not supported by pyvisa as terminator this\n    class overloads the device communication methods.\n\n    :param adapter: pyvisa resource name of the instrument or adapter instance\n    :param string name: The name of the instrument.\n    :param address: device address included in every message to the instrument\n                    (default=253)\n    :param kwargs: Any valid key-word argument for Instrument\n    \"\"\"\n    channels = Instrument.ChannelCreator(\n        (IonGaugeAndPressureChannel, PressureChannel) * 3,\n        (\"1\", \"2\", \"3\", \"4\", \"5\", \"6\"),\n    )  # Channels 1,3,5 have both an ion gauge and a pressure sensor, 2,4,6 only a pressure sensor\n\n    def __init__(self, adapter, name=\"MKS 937B vacuum gauge controller\", address=253, **kwargs):\n        super().__init__(\n            adapter,\n            name,\n            includeSCPI=False,\n            read_termination=\";\",  # in reality its \";FF\"\n            # which is, however, invalid for pyvisa. Therefore extra bytes have to\n            # be read in the read() method and the terminators are hardcoded here.\n            write_termination=\";FF\",\n            **kwargs\n        )\n        self.address = address\n        # compiled regular expression for finding numerical values in reply strings\n        self._re_response = re.compile(fr\"@{self.address:03d}(?P<ack>ACK)?(?P<msg>.*)\")\n\n    def _extract_reply(self, reply):\n        \"\"\" preprocess_reply function which tries to extract <Response> from\n        '@<aaa>ACK<Response>;FF'. If <Response> can not be identified the orignal string\n        is returned.\n        :param reply: reply string\n        :returns: string with only the response, or the original string\n        \"\"\"\n        rvalue = self._re_response.search(reply)\n        if rvalue:\n            return rvalue.group('msg')\n        return reply\n\n    def _prepend_address(self, cmd):\n        \"\"\"\n        create command string by including the device address\n        \"\"\"\n        return f\"@{self.address:03d}{cmd}\"\n\n    def _check_extra_termination(self):\n        \"\"\"\n        Check the read termination to correspond to the protocol\n        \"\"\"\n        t = super().read_bytes(2)  # read extra termination chars 'FF'\n        if t != b'FF':\n            raise ValueError(f\"unexpected termination string received {t}\")\n\n    def read(self):\n        \"\"\"\n        Reads from the instrument including the correct termination characters\n        \"\"\"\n        ret = super().read()\n        self._check_extra_termination()\n        return self._extract_reply(ret)\n\n    def write(self, command):\n        \"\"\"\n        Write to the instrument including the device address.\n\n        :param command: command string to be sent to the instrument\n        \"\"\"\n        super().write(self._prepend_address(command))\n\n    def check_set_errors(self):\n        \"\"\"\n        Check reply string for acknowledgement string.\n        \"\"\"\n        ret = super().read()  # use super read to get raw reply\n        reply = self._re_response.search(ret)\n        if reply:\n            if reply.group('ack') == 'ACK':\n                return\n        # no valid acknowledgement message found\n        raise ValueError(f\"invalid reply '{ret}' found in check_errors\")\n\n    serial = Instrument.measurement(\n        \"SN?\", \"\"\" Serial number of the instrument \"\"\",\n        cast=str,\n    )\n\n    all_pressures = Instrument.measurement(\n        \"PRZ?\", \"\"\" Read pressures on all channels in selected units \"\"\",\n    )\n\n    combined_pressure1 = Instrument.measurement(\n        \"PC1?\", \"\"\" Read pressure on channel 1 and its combination sensor \"\"\",\n    )\n\n    combined_pressure2 = Instrument.measurement(\n        \"PC2?\", \"\"\" Read pressure on channel 2 and its combination sensor \"\"\",\n    )\n\n    unit = Instrument.control(\n        \"U?\", \"U!%s\",\n        \"\"\"Pressure unit used for all pressure readings from the instrument\"\"\",\n        validator=strict_discrete_set,\n        map_values=True,\n        values={\"Torr\": \"TORR\",\n                \"mBar\": \"mBAR\",\n                \"Pascal\": \"PASCAL\",\n                \"Micron\": \"MICRON\",\n                },\n        check_set_errors=True,\n    )\n", "path": "pymeasure/instruments/mksinst/mks937b.py"}], "after_files": [{"content": "#\n# This file is part of the PyMeasure package.\n#\n# Copyright (c) 2013-2023 PyMeasure Developers\n#\n# Permission is hereby granted, free of charge, to any person obtaining a copy\n# of this software and associated documentation files (the \"Software\"), to deal\n# in the Software without restriction, including without limitation the rights\n# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n# copies of the Software, and to permit persons to whom the Software is\n# furnished to do so, subject to the following conditions:\n#\n# The above copyright notice and this permission notice shall be included in\n# all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n# THE SOFTWARE.\n#\n\nimport re\n\nfrom pymeasure.instruments import Channel, Instrument\nfrom pymeasure.instruments.validators import strict_discrete_set\n\n\n_ion_gauge_status = {\"Wait\": \"W\",\n                     \"Off\": \"O\",\n                     \"Protect\": \"P\",\n                     \"Degas\": \"D\",\n                     \"Control\": \"C\",\n                     \"Rear panel Ctrl off\": \"R\",\n                     \"HC filament fault\": \"H\",\n                     \"No gauge\": \"N\",\n                     \"Good\": \"G\",\n                     \"NOT_IONGAUGE\": \"NAK152\",\n                     \"INVALID COMMAND\": \"NAK160\",\n                     }\n\n\nclass PressureChannel(Channel):\n    pressure = Channel.measurement(\n        \"PR{ch}?\", \"\"\" Pressure on the channel in units selected on the device\"\"\",\n    )\n\n    power_enabled = Channel.control(\n        \"CP{ch}?\", \"CP{ch}!%s\",\n        \"\"\"Power status of the channel\"\"\",\n        validator=strict_discrete_set,\n        map_values=True,\n        values={True: \"ON\", False: \"OFF\"},\n        check_set_errors=True,\n    )\n\n\nclass IonGaugeAndPressureChannel(PressureChannel):\n    \"\"\"Channel having both a pressure and an ion gauge sensor\"\"\"\n    ion_gauge_status = Channel.measurement(\n        \"T{ch}?\",\n        \"\"\"Ion gauge status of the channel\"\"\",\n        map_values=True,\n        values=_ion_gauge_status,\n    )\n\n\nclass MKS937B(Instrument):\n    \"\"\" MKS 937B vacuum gauge controller\n\n    Connection to the device is made through an RS232/RS485 serial connection.\n    The communication protocol of this device is as follows:\n\n    Query: '@<aaa><Command>?;FF' with the response '@<aaa>ACK<Response>;FF'\n    Set command: '@<aaa><Command>!<parameter>;FF' with the response '@<aaa>ACK<Response>;FF'\n    Above <aaa> is an address from 001 to 254 which can be specified upon\n    initialization. Since ';FF' is not supported by pyvisa as terminator this\n    class overloads the device communication methods.\n\n    :param adapter: pyvisa resource name of the instrument or adapter instance\n    :param string name: The name of the instrument.\n    :param address: device address included in every message to the instrument\n                    (default=253)\n    :param kwargs: Any valid key-word argument for Instrument\n    \"\"\"\n    channels = Instrument.ChannelCreator(\n        (IonGaugeAndPressureChannel, PressureChannel) * 3,\n        (\"1\", \"2\", \"3\", \"4\", \"5\", \"6\"),\n    )  # Channels 1,3,5 have both an ion gauge and a pressure sensor, 2,4,6 only a pressure sensor\n\n    def __init__(self, adapter, name=\"MKS 937B vacuum gauge controller\", address=253, **kwargs):\n        super().__init__(\n            adapter,\n            name,\n            includeSCPI=False,\n            read_termination=\";\",  # in reality its \";FF\"\n            # which is, however, invalid for pyvisa. Therefore extra bytes have to\n            # be read in the read() method and the terminators are hardcoded here.\n            write_termination=\";FF\",\n            **kwargs\n        )\n        self.address = address\n        # compiled regular expression for finding numerical values in reply strings\n        self._re_response = re.compile(fr\"@{self.address:03d}(?P<ack>ACK)?(?P<msg>.*)\")\n\n    def _extract_reply(self, reply):\n        \"\"\" preprocess_reply function which tries to extract <Response> from\n        '@<aaa>ACK<Response>;FF'. If <Response> can not be identified the orignal string\n        is returned.\n        :param reply: reply string\n        :returns: string with only the response, or the original string\n        \"\"\"\n        rvalue = self._re_response.search(reply)\n        if rvalue:\n            return rvalue.group('msg')\n        return reply\n\n    def _prepend_address(self, cmd):\n        \"\"\"\n        create command string by including the device address\n        \"\"\"\n        return f\"@{self.address:03d}{cmd}\"\n\n    def _check_extra_termination(self):\n        \"\"\"\n        Check the read termination to correspond to the protocol\n        \"\"\"\n        t = super().read_bytes(2)  # read extra termination chars 'FF'\n        if t != b'FF':\n            raise ValueError(f\"unexpected termination string received {t}\")\n\n    def read(self):\n        \"\"\"\n        Reads from the instrument including the correct termination characters\n        \"\"\"\n        ret = super().read()\n        self._check_extra_termination()\n        return self._extract_reply(ret)\n\n    def write(self, command):\n        \"\"\"\n        Write to the instrument including the device address.\n\n        :param command: command string to be sent to the instrument\n        \"\"\"\n        super().write(self._prepend_address(command))\n\n    def check_set_errors(self):\n        \"\"\"\n        Check reply string for acknowledgement string.\n        \"\"\"\n        ret = super().read()  # use super read to get raw reply\n        reply = self._re_response.search(ret)\n        if reply:\n            if reply.group('ack') == 'ACK':\n                self._check_extra_termination()\n                return []\n        # no valid acknowledgement message found\n        raise ValueError(f\"invalid reply '{ret}' found in check_errors\")\n\n    serial = Instrument.measurement(\n        \"SN?\", \"\"\" Serial number of the instrument \"\"\",\n        cast=str,\n    )\n\n    all_pressures = Instrument.measurement(\n        \"PRZ?\", \"\"\" Read pressures on all channels in selected units \"\"\",\n    )\n\n    combined_pressure1 = Instrument.measurement(\n        \"PC1?\", \"\"\" Read pressure on channel 1 and its combination sensor \"\"\",\n    )\n\n    combined_pressure2 = Instrument.measurement(\n        \"PC2?\", \"\"\" Read pressure on channel 2 and its combination sensor \"\"\",\n    )\n\n    unit = Instrument.control(\n        \"U?\", \"U!%s\",\n        \"\"\"Pressure unit used for all pressure readings from the instrument\"\"\",\n        validator=strict_discrete_set,\n        map_values=True,\n        values={\"Torr\": \"TORR\",\n                \"mBar\": \"mBAR\",\n                \"Pascal\": \"PASCAL\",\n                \"Micron\": \"MICRON\",\n                },\n        check_set_errors=True,\n    )\n", "path": "pymeasure/instruments/mksinst/mks937b.py"}]}