We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Remove verify_interface
Now that `register_interface` is gone we have no use for `verify_interface`, but https://github.com/aws/aws-encryption-sdk-python/issues/464 is a blocker for removing it.

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `src/cryptography/utils.py`
Content:
```
1 # This file is dual licensed under the terms of the Apache License, Version
2 # 2.0, and the BSD License. See the LICENSE file in the root of this repository
3 # for complete details.
4 
5 
6 import abc
7 import enum
8 import sys
9 import types
10 import typing
11 import warnings
12 
13 
14 # We use a UserWarning subclass, instead of DeprecationWarning, because CPython
15 # decided deprecation warnings should be invisble by default.
16 class CryptographyDeprecationWarning(UserWarning):
17     pass
18 
19 
20 # Several APIs were deprecated with no specific end-of-life date because of the
21 # ubiquity of their use. They should not be removed until we agree on when that
22 # cycle ends.
23 DeprecatedIn36 = CryptographyDeprecationWarning
24 DeprecatedIn37 = CryptographyDeprecationWarning
25 DeprecatedIn39 = CryptographyDeprecationWarning
26 DeprecatedIn40 = CryptographyDeprecationWarning
27 
28 
29 def _check_bytes(name: str, value: bytes) -> None:
30     if not isinstance(value, bytes):
31         raise TypeError(f"{name} must be bytes")
32 
33 
34 def _check_byteslike(name: str, value: bytes) -> None:
35     try:
36         memoryview(value)
37     except TypeError:
38         raise TypeError(f"{name} must be bytes-like")
39 
40 
41 def int_to_bytes(integer: int, length: typing.Optional[int] = None) -> bytes:
42     return integer.to_bytes(
43         length or (integer.bit_length() + 7) // 8 or 1, "big"
44     )
45 
46 
47 class InterfaceNotImplemented(Exception):
48     pass
49 
50 
51 # DeprecatedIn39 -- Our only known consumer is aws-encryption-sdk, but we've
52 # made this a no-op to avoid breaking old versions.
53 def verify_interface(
54     iface: abc.ABCMeta, klass: object, *, check_annotations: bool = False
55 ):
56     # Exists exclusively for `aws-encryption-sdk` which relies on it existing,
57     # even though it was never a public API.
58     pass
59 
60 
61 class _DeprecatedValue:
62     def __init__(self, value: object, message: str, warning_class):
63         self.value = value
64         self.message = message
65         self.warning_class = warning_class
66 
67 
68 class _ModuleWithDeprecations(types.ModuleType):
69     def __init__(self, module: types.ModuleType):
70         super().__init__(module.__name__)
71         self.__dict__["_module"] = module
72 
73     def __getattr__(self, attr: str) -> object:
74         obj = getattr(self._module, attr)
75         if isinstance(obj, _DeprecatedValue):
76             warnings.warn(obj.message, obj.warning_class, stacklevel=2)
77             obj = obj.value
78         return obj
79 
80     def __setattr__(self, attr: str, value: object) -> None:
81         setattr(self._module, attr, value)
82 
83     def __delattr__(self, attr: str) -> None:
84         obj = getattr(self._module, attr)
85         if isinstance(obj, _DeprecatedValue):
86             warnings.warn(obj.message, obj.warning_class, stacklevel=2)
87 
88         delattr(self._module, attr)
89 
90     def __dir__(self) -> typing.Sequence[str]:
91         return ["_module"] + dir(self._module)
92 
93 
94 def deprecated(
95     value: object,
96     module_name: str,
97     message: str,
98     warning_class: typing.Type[Warning],
99     name: typing.Optional[str] = None,
100 ) -> _DeprecatedValue:
101     module = sys.modules[module_name]
102     if not isinstance(module, _ModuleWithDeprecations):
103         sys.modules[module_name] = module = _ModuleWithDeprecations(module)
104     dv = _DeprecatedValue(value, message, warning_class)
105     # Maintain backwards compatibility with `name is None` for pyOpenSSL.
106     if name is not None:
107         setattr(module, name, dv)
108     return dv
109 
110 
111 def cached_property(func: typing.Callable) -> property:
112     cached_name = f"_cached_{func}"
113     sentinel = object()
114 
115     def inner(instance: object):
116         cache = getattr(instance, cached_name, sentinel)
117         if cache is not sentinel:
118             return cache
119         result = func(instance)
120         setattr(instance, cached_name, result)
121         return result
122 
123     return property(inner)
124 
125 
126 # Python 3.10 changed representation of enums. We use well-defined object
127 # representation and string representation from Python 3.9.
128 class Enum(enum.Enum):
129     def __repr__(self) -> str:
130         return f"<{self.__class__.__name__}.{self._name_}: {self._value_!r}>"
131 
132     def __str__(self) -> str:
133         return f"{self.__class__.__name__}.{self._name_}"
134
```
--- 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/src/cryptography/utils.py b/src/cryptography/utils.py
--- a/src/cryptography/utils.py
+++ b/src/cryptography/utils.py
@@ -3,7 +3,6 @@
 # for complete details.
 
 
-import abc
 import enum
 import sys
 import types
@@ -48,16 +47,6 @@
     pass
 
 
-# DeprecatedIn39 -- Our only known consumer is aws-encryption-sdk, but we've
-# made this a no-op to avoid breaking old versions.
-def verify_interface(
-    iface: abc.ABCMeta, klass: object, *, check_annotations: bool = False
-):
-    # Exists exclusively for `aws-encryption-sdk` which relies on it existing,
-    # even though it was never a public API.
-    pass
-
-
 class _DeprecatedValue:
     def __init__(self, value: object, message: str, warning_class):
         self.value = value

{"golden_diff": "diff --git a/src/cryptography/utils.py b/src/cryptography/utils.py\n--- a/src/cryptography/utils.py\n+++ b/src/cryptography/utils.py\n@@ -3,7 +3,6 @@\n # for complete details.\n \n \n-import abc\n import enum\n import sys\n import types\n@@ -48,16 +47,6 @@\n     pass\n \n \n-# DeprecatedIn39 -- Our only known consumer is aws-encryption-sdk, but we've\n-# made this a no-op to avoid breaking old versions.\n-def verify_interface(\n-    iface: abc.ABCMeta, klass: object, *, check_annotations: bool = False\n-):\n-    # Exists exclusively for `aws-encryption-sdk` which relies on it existing,\n-    # even though it was never a public API.\n-    pass\n-\n-\n class _DeprecatedValue:\n     def __init__(self, value: object, message: str, warning_class):\n         self.value = value\n", "issue": "Remove verify_interface\nNow that `register_interface` is gone we have no use for `verify_interface`, but https://github.com/aws/aws-encryption-sdk-python/issues/464 is a blocker for removing it.\n", "before_files": [{"content": "# This file is dual licensed under the terms of the Apache License, Version\n# 2.0, and the BSD License. See the LICENSE file in the root of this repository\n# for complete details.\n\n\nimport abc\nimport enum\nimport sys\nimport types\nimport typing\nimport warnings\n\n\n# We use a UserWarning subclass, instead of DeprecationWarning, because CPython\n# decided deprecation warnings should be invisble by default.\nclass CryptographyDeprecationWarning(UserWarning):\n    pass\n\n\n# Several APIs were deprecated with no specific end-of-life date because of the\n# ubiquity of their use. They should not be removed until we agree on when that\n# cycle ends.\nDeprecatedIn36 = CryptographyDeprecationWarning\nDeprecatedIn37 = CryptographyDeprecationWarning\nDeprecatedIn39 = CryptographyDeprecationWarning\nDeprecatedIn40 = CryptographyDeprecationWarning\n\n\ndef _check_bytes(name: str, value: bytes) -> None:\n    if not isinstance(value, bytes):\n        raise TypeError(f\"{name} must be bytes\")\n\n\ndef _check_byteslike(name: str, value: bytes) -> None:\n    try:\n        memoryview(value)\n    except TypeError:\n        raise TypeError(f\"{name} must be bytes-like\")\n\n\ndef int_to_bytes(integer: int, length: typing.Optional[int] = None) -> bytes:\n    return integer.to_bytes(\n        length or (integer.bit_length() + 7) // 8 or 1, \"big\"\n    )\n\n\nclass InterfaceNotImplemented(Exception):\n    pass\n\n\n# DeprecatedIn39 -- Our only known consumer is aws-encryption-sdk, but we've\n# made this a no-op to avoid breaking old versions.\ndef verify_interface(\n    iface: abc.ABCMeta, klass: object, *, check_annotations: bool = False\n):\n    # Exists exclusively for `aws-encryption-sdk` which relies on it existing,\n    # even though it was never a public API.\n    pass\n\n\nclass _DeprecatedValue:\n    def __init__(self, value: object, message: str, warning_class):\n        self.value = value\n        self.message = message\n        self.warning_class = warning_class\n\n\nclass _ModuleWithDeprecations(types.ModuleType):\n    def __init__(self, module: types.ModuleType):\n        super().__init__(module.__name__)\n        self.__dict__[\"_module\"] = module\n\n    def __getattr__(self, attr: str) -> object:\n        obj = getattr(self._module, attr)\n        if isinstance(obj, _DeprecatedValue):\n            warnings.warn(obj.message, obj.warning_class, stacklevel=2)\n            obj = obj.value\n        return obj\n\n    def __setattr__(self, attr: str, value: object) -> None:\n        setattr(self._module, attr, value)\n\n    def __delattr__(self, attr: str) -> None:\n        obj = getattr(self._module, attr)\n        if isinstance(obj, _DeprecatedValue):\n            warnings.warn(obj.message, obj.warning_class, stacklevel=2)\n\n        delattr(self._module, attr)\n\n    def __dir__(self) -> typing.Sequence[str]:\n        return [\"_module\"] + dir(self._module)\n\n\ndef deprecated(\n    value: object,\n    module_name: str,\n    message: str,\n    warning_class: typing.Type[Warning],\n    name: typing.Optional[str] = None,\n) -> _DeprecatedValue:\n    module = sys.modules[module_name]\n    if not isinstance(module, _ModuleWithDeprecations):\n        sys.modules[module_name] = module = _ModuleWithDeprecations(module)\n    dv = _DeprecatedValue(value, message, warning_class)\n    # Maintain backwards compatibility with `name is None` for pyOpenSSL.\n    if name is not None:\n        setattr(module, name, dv)\n    return dv\n\n\ndef cached_property(func: typing.Callable) -> property:\n    cached_name = f\"_cached_{func}\"\n    sentinel = object()\n\n    def inner(instance: object):\n        cache = getattr(instance, cached_name, sentinel)\n        if cache is not sentinel:\n            return cache\n        result = func(instance)\n        setattr(instance, cached_name, result)\n        return result\n\n    return property(inner)\n\n\n# Python 3.10 changed representation of enums. We use well-defined object\n# representation and string representation from Python 3.9.\nclass Enum(enum.Enum):\n    def __repr__(self) -> str:\n        return f\"<{self.__class__.__name__}.{self._name_}: {self._value_!r}>\"\n\n    def __str__(self) -> str:\n        return f\"{self.__class__.__name__}.{self._name_}\"\n", "path": "src/cryptography/utils.py"}], "after_files": [{"content": "# This file is dual licensed under the terms of the Apache License, Version\n# 2.0, and the BSD License. See the LICENSE file in the root of this repository\n# for complete details.\n\n\nimport enum\nimport sys\nimport types\nimport typing\nimport warnings\n\n\n# We use a UserWarning subclass, instead of DeprecationWarning, because CPython\n# decided deprecation warnings should be invisble by default.\nclass CryptographyDeprecationWarning(UserWarning):\n    pass\n\n\n# Several APIs were deprecated with no specific end-of-life date because of the\n# ubiquity of their use. They should not be removed until we agree on when that\n# cycle ends.\nDeprecatedIn36 = CryptographyDeprecationWarning\nDeprecatedIn37 = CryptographyDeprecationWarning\nDeprecatedIn39 = CryptographyDeprecationWarning\nDeprecatedIn40 = CryptographyDeprecationWarning\n\n\ndef _check_bytes(name: str, value: bytes) -> None:\n    if not isinstance(value, bytes):\n        raise TypeError(f\"{name} must be bytes\")\n\n\ndef _check_byteslike(name: str, value: bytes) -> None:\n    try:\n        memoryview(value)\n    except TypeError:\n        raise TypeError(f\"{name} must be bytes-like\")\n\n\ndef int_to_bytes(integer: int, length: typing.Optional[int] = None) -> bytes:\n    return integer.to_bytes(\n        length or (integer.bit_length() + 7) // 8 or 1, \"big\"\n    )\n\n\nclass InterfaceNotImplemented(Exception):\n    pass\n\n\nclass _DeprecatedValue:\n    def __init__(self, value: object, message: str, warning_class):\n        self.value = value\n        self.message = message\n        self.warning_class = warning_class\n\n\nclass _ModuleWithDeprecations(types.ModuleType):\n    def __init__(self, module: types.ModuleType):\n        super().__init__(module.__name__)\n        self.__dict__[\"_module\"] = module\n\n    def __getattr__(self, attr: str) -> object:\n        obj = getattr(self._module, attr)\n        if isinstance(obj, _DeprecatedValue):\n            warnings.warn(obj.message, obj.warning_class, stacklevel=2)\n            obj = obj.value\n        return obj\n\n    def __setattr__(self, attr: str, value: object) -> None:\n        setattr(self._module, attr, value)\n\n    def __delattr__(self, attr: str) -> None:\n        obj = getattr(self._module, attr)\n        if isinstance(obj, _DeprecatedValue):\n            warnings.warn(obj.message, obj.warning_class, stacklevel=2)\n\n        delattr(self._module, attr)\n\n    def __dir__(self) -> typing.Sequence[str]:\n        return [\"_module\"] + dir(self._module)\n\n\ndef deprecated(\n    value: object,\n    module_name: str,\n    message: str,\n    warning_class: typing.Type[Warning],\n    name: typing.Optional[str] = None,\n) -> _DeprecatedValue:\n    module = sys.modules[module_name]\n    if not isinstance(module, _ModuleWithDeprecations):\n        sys.modules[module_name] = module = _ModuleWithDeprecations(module)\n    dv = _DeprecatedValue(value, message, warning_class)\n    # Maintain backwards compatibility with `name is None` for pyOpenSSL.\n    if name is not None:\n        setattr(module, name, dv)\n    return dv\n\n\ndef cached_property(func: typing.Callable) -> property:\n    cached_name = f\"_cached_{func}\"\n    sentinel = object()\n\n    def inner(instance: object):\n        cache = getattr(instance, cached_name, sentinel)\n        if cache is not sentinel:\n            return cache\n        result = func(instance)\n        setattr(instance, cached_name, result)\n        return result\n\n    return property(inner)\n\n\n# Python 3.10 changed representation of enums. We use well-defined object\n# representation and string representation from Python 3.9.\nclass Enum(enum.Enum):\n    def __repr__(self) -> str:\n        return f\"<{self.__class__.__name__}.{self._name_}: {self._value_!r}>\"\n\n    def __str__(self) -> str:\n        return f\"{self.__class__.__name__}.{self._name_}\"\n", "path": "src/cryptography/utils.py"}]}