We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
propagate_guide() of Encoder raises a TypeError
When running the replication of [Gatys et al. 2017](https://github.com/pmeier/pystiche/blob/3260b68ea8dd88de433777ad3750d7abe3894743/replication/gatys_et_al_2017.py#L254), the following error is raised:

```
TypeError: Unions cannot be used with isinstance().
```

This points towards the [Encoder](https://github.com/pmeier/pystiche/blob/3260b68ea8dd88de433777ad3750d7abe3894743/pystiche/encoding/encoder.py#L12), specifically these `if` statements in the `propagate_guide()` method:

https://github.com/pmeier/pystiche/blob/3260b68ea8dd88de433777ad3750d7abe3894743/pystiche/encoding/encoder.py#L50-L53

`PoolModule` and `ConvModule` are defined in `pystiche.typing`:

https://github.com/pmeier/pystiche/blob/3260b68ea8dd88de433777ad3750d7abe3894743/pystiche/typing.py#L18-L23


--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `pystiche/typing.py`
Content:
```
1 from typing import Union, Sequence
2 import torch
3 from torch import nn
4 
5 __all__ = [
6     "Numeric",
7     "TensorMeta",
8     "ConvModule",
9     "ConvModuleMeta",
10     "PoolModule",
11     "PoolModuleMeta",
12 ]
13 
14 Numeric = Union[int, float]
15 
16 TensorMeta = Union[torch.device, torch.dtype]
17 
18 ConvModule = Union[nn.Conv1d, nn.Conv2d, nn.Conv2d]
19 ConvModuleMeta = Union[int, Sequence[int]]
20 
21 PoolModule = Union[
22     nn.AvgPool1d, nn.AvgPool2d, nn.AvgPool3d, nn.MaxPool1d, nn.MaxPool2d, nn.MaxPool3d
23 ]
24 PoolModuleMeta = Union[int, Sequence[int]]
25
```
--- 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/pystiche/typing.py b/pystiche/typing.py
--- a/pystiche/typing.py
+++ b/pystiche/typing.py
@@ -1,4 +1,4 @@
-from typing import Union, Sequence
+from typing import Union, Any, Sequence
 import torch
 from torch import nn
 
@@ -6,8 +6,10 @@
     "Numeric",
     "TensorMeta",
     "ConvModule",
+    "is_conv_module",
     "ConvModuleMeta",
     "PoolModule",
+    "is_pool_module",
     "PoolModuleMeta",
 ]
 
@@ -15,10 +17,32 @@
 
 TensorMeta = Union[torch.device, torch.dtype]
 
-ConvModule = Union[nn.Conv1d, nn.Conv2d, nn.Conv2d]
+ConvModule = Union[nn.Conv1d, nn.Conv2d, nn.Conv3d]
+
+
+def is_conv_module(x: Any) -> bool:
+    return isinstance(x, (nn.Conv1d, nn.Conv2d, nn.Conv3d))
+
+
 ConvModuleMeta = Union[int, Sequence[int]]
 
 PoolModule = Union[
     nn.AvgPool1d, nn.AvgPool2d, nn.AvgPool3d, nn.MaxPool1d, nn.MaxPool2d, nn.MaxPool3d
 ]
+
+
+def is_pool_module(x: Any) -> bool:
+    return isinstance(
+        x,
+        (
+            nn.AvgPool1d,
+            nn.AvgPool2d,
+            nn.AvgPool3d,
+            nn.MaxPool1d,
+            nn.MaxPool2d,
+            nn.MaxPool3d,
+        ),
+    )
+
+
 PoolModuleMeta = Union[int, Sequence[int]]

{"golden_diff": "diff --git a/pystiche/typing.py b/pystiche/typing.py\n--- a/pystiche/typing.py\n+++ b/pystiche/typing.py\n@@ -1,4 +1,4 @@\n-from typing import Union, Sequence\n+from typing import Union, Any, Sequence\n import torch\n from torch import nn\n \n@@ -6,8 +6,10 @@\n     \"Numeric\",\n     \"TensorMeta\",\n     \"ConvModule\",\n+    \"is_conv_module\",\n     \"ConvModuleMeta\",\n     \"PoolModule\",\n+    \"is_pool_module\",\n     \"PoolModuleMeta\",\n ]\n \n@@ -15,10 +17,32 @@\n \n TensorMeta = Union[torch.device, torch.dtype]\n \n-ConvModule = Union[nn.Conv1d, nn.Conv2d, nn.Conv2d]\n+ConvModule = Union[nn.Conv1d, nn.Conv2d, nn.Conv3d]\n+\n+\n+def is_conv_module(x: Any) -> bool:\n+    return isinstance(x, (nn.Conv1d, nn.Conv2d, nn.Conv3d))\n+\n+\n ConvModuleMeta = Union[int, Sequence[int]]\n \n PoolModule = Union[\n     nn.AvgPool1d, nn.AvgPool2d, nn.AvgPool3d, nn.MaxPool1d, nn.MaxPool2d, nn.MaxPool3d\n ]\n+\n+\n+def is_pool_module(x: Any) -> bool:\n+    return isinstance(\n+        x,\n+        (\n+            nn.AvgPool1d,\n+            nn.AvgPool2d,\n+            nn.AvgPool3d,\n+            nn.MaxPool1d,\n+            nn.MaxPool2d,\n+            nn.MaxPool3d,\n+        ),\n+    )\n+\n+\n PoolModuleMeta = Union[int, Sequence[int]]\n", "issue": "propagate_guide() of Encoder raises a TypeError\nWhen running the replication of [Gatys et al. 2017](https://github.com/pmeier/pystiche/blob/3260b68ea8dd88de433777ad3750d7abe3894743/replication/gatys_et_al_2017.py#L254), the following error is raised:\r\n\r\n```\r\nTypeError: Unions cannot be used with isinstance().\r\n```\r\n\r\nThis points towards the [Encoder](https://github.com/pmeier/pystiche/blob/3260b68ea8dd88de433777ad3750d7abe3894743/pystiche/encoding/encoder.py#L12), specifically these `if` statements in the `propagate_guide()` method:\r\n\r\nhttps://github.com/pmeier/pystiche/blob/3260b68ea8dd88de433777ad3750d7abe3894743/pystiche/encoding/encoder.py#L50-L53\r\n\r\n`PoolModule` and `ConvModule` are defined in `pystiche.typing`:\r\n\r\nhttps://github.com/pmeier/pystiche/blob/3260b68ea8dd88de433777ad3750d7abe3894743/pystiche/typing.py#L18-L23\r\n\n", "before_files": [{"content": "from typing import Union, Sequence\nimport torch\nfrom torch import nn\n\n__all__ = [\n    \"Numeric\",\n    \"TensorMeta\",\n    \"ConvModule\",\n    \"ConvModuleMeta\",\n    \"PoolModule\",\n    \"PoolModuleMeta\",\n]\n\nNumeric = Union[int, float]\n\nTensorMeta = Union[torch.device, torch.dtype]\n\nConvModule = Union[nn.Conv1d, nn.Conv2d, nn.Conv2d]\nConvModuleMeta = Union[int, Sequence[int]]\n\nPoolModule = Union[\n    nn.AvgPool1d, nn.AvgPool2d, nn.AvgPool3d, nn.MaxPool1d, nn.MaxPool2d, nn.MaxPool3d\n]\nPoolModuleMeta = Union[int, Sequence[int]]\n", "path": "pystiche/typing.py"}], "after_files": [{"content": "from typing import Union, Any, Sequence\nimport torch\nfrom torch import nn\n\n__all__ = [\n    \"Numeric\",\n    \"TensorMeta\",\n    \"ConvModule\",\n    \"is_conv_module\",\n    \"ConvModuleMeta\",\n    \"PoolModule\",\n    \"is_pool_module\",\n    \"PoolModuleMeta\",\n]\n\nNumeric = Union[int, float]\n\nTensorMeta = Union[torch.device, torch.dtype]\n\nConvModule = Union[nn.Conv1d, nn.Conv2d, nn.Conv3d]\n\n\ndef is_conv_module(x: Any) -> bool:\n    return isinstance(x, (nn.Conv1d, nn.Conv2d, nn.Conv3d))\n\n\nConvModuleMeta = Union[int, Sequence[int]]\n\nPoolModule = Union[\n    nn.AvgPool1d, nn.AvgPool2d, nn.AvgPool3d, nn.MaxPool1d, nn.MaxPool2d, nn.MaxPool3d\n]\n\n\ndef is_pool_module(x: Any) -> bool:\n    return isinstance(\n        x,\n        (\n            nn.AvgPool1d,\n            nn.AvgPool2d,\n            nn.AvgPool3d,\n            nn.MaxPool1d,\n            nn.MaxPool2d,\n            nn.MaxPool3d,\n        ),\n    )\n\n\nPoolModuleMeta = Union[int, Sequence[int]]\n", "path": "pystiche/typing.py"}]}