We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Add example code block to `switch` docstring
I recently realized I hadn't touched the `switch` code in a long time, and I would've really appreciated an example to work off of.  Instead, I ended up looking at our tests which most users won't want to do.  Relevant doc: https://docs.prefect.io/api/unreleased/tasks/control_flow.html#prefect-tasks-control-flow-conditional-switch

--- 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/prefect/tasks/control_flow/conditional.py`
Content:
```
1 from typing import Any, Dict
2 
3 import prefect
4 from prefect import Task
5 from prefect.engine import signals
6 from prefect.engine.result import NoResult
7 
8 __all__ = ["switch", "ifelse"]
9 
10 
11 class Merge(Task):
12     def __init__(self, **kwargs) -> None:
13         if kwargs.setdefault("skip_on_upstream_skip", False):
14             raise ValueError("Merge tasks must have `skip_on_upstream_skip=False`.")
15         super().__init__(**kwargs)
16 
17     def run(self, **task_results: Any) -> Any:
18         return next((v for v in task_results.values() if v != NoResult), None)
19 
20 
21 class CompareValue(Task):
22     """
23     This task stores a `value` at initialization and compares it to a `value` received at runtime.
24     If the values don't match, it raises a SKIP exception.
25 
26     Args:
27         - value (Any): the value this task will attempt to match when it runs
28         - **kwargs: keyword arguments for the Task
29     """
30 
31     def __init__(self, value: Any, **kwargs: Any):
32         self.value = value
33         kwargs.setdefault("name", 'CompareValue: "{}"'.format(value))
34         super().__init__(**kwargs)
35 
36     def run(self, value: Any) -> None:
37         """
38         Raises a SKIP signal if the passed value does not match the task's match value;
39         succeeds silently otherwise.
40 
41         Args:
42             - value (Any): the value that will be matched against the task's value.
43         """
44         if value != self.value:
45             raise signals.SKIP(
46                 'Provided value "{}" did not match "{}"'.format(value, self.value)
47             )
48 
49 
50 def switch(condition: Task, cases: Dict[Any, Task]) -> None:
51     """
52     Adds a SWITCH to a workflow.
53 
54     The condition task is evaluated and the result is compared to the keys of the cases
55     dictionary. The task corresponding to the matching key is run; all other tasks are
56     skipped. Any tasks downstream of the skipped tasks are also skipped unless they set
57     `skip_on_upstream_skip=False`.
58 
59     Args:
60         - condition (Task): a task whose result forms the condition for the switch
61         - cases (Dict[Any, Task]): a dict representing the "case" statements of the switch.
62             The value of the `condition` task will be compared to the keys of this dict, and
63             the matching task will be executed.
64 
65     Raises:
66         - PrefectWarning: if any of the tasks in "cases" have upstream dependencies,
67             then this task will warn that those upstream tasks may run whether or not the switch condition matches their branch. The most common cause of this
68             is passing a list of tasks as one of the cases, which adds the `List` task
69             to the switch condition but leaves the tasks themselves upstream.
70     """
71 
72     with prefect.tags("switch"):
73         for value, task in cases.items():
74             task = prefect.utilities.tasks.as_task(task)
75             match_condition = CompareValue(value=value).bind(value=condition)
76             task.set_dependencies(upstream_tasks=[match_condition])
77 
78 
79 def ifelse(condition: Task, true_task: Task, false_task: Task) -> None:
80     """
81     Builds a conditional branch into a workflow.
82 
83     If the condition evaluates True(ish), the true_task will run. If it
84     evaluates False(ish), the false_task will run. The task doesn't run is Skipped, as are
85     all downstream tasks that don't set `skip_on_upstream_skip=False`.
86 
87     Args:
88         - condition (Task): a task whose boolean result forms the condition for the ifelse
89         - true_task (Task): a task that will be executed if the condition is True
90         - false_task (Task): a task that will be executed if the condition is False
91     """
92 
93     switch(condition=condition, cases={True: true_task, False: false_task})
94 
95 
96 def merge(*tasks: Task) -> Task:
97     """
98     Merges conditional branches back together.
99 
100     A conditional branch in a flow results in one or more tasks proceeding and one or
101     more tasks skipping. It is often convenient to merge those branches back into a
102     single result. This function is a simple way to achieve that goal.
103 
104     The merge will return the first real result it encounters, or `None`. If multiple
105     tasks might return a result, group them with a list.
106 
107     Example:
108         ```python
109         with Flow("My Flow"):
110             true_branch = ActionIfTrue()
111             false_branch = ActionIfFalse()
112             ifelse(CheckCondition(), true_branch, false_branch)
113 
114             merged_result = merge(true_branch, false_branch)
115         ```
116 
117     Args:
118         - *tasks (Task): tasks whose results should be merged into a single result. The tasks are
119             assumed to all sit downstream of different `switch` branches, such that only
120             one of them will contain a result and the others will all be skipped.
121 
122     Returns:
123         - Task: a Task representing the merged result.
124 
125     """
126     return Merge().bind(**{"task_{}".format(i + 1): t for i, t in enumerate(tasks)})
127
```
--- 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/prefect/tasks/control_flow/conditional.py b/src/prefect/tasks/control_flow/conditional.py
--- a/src/prefect/tasks/control_flow/conditional.py
+++ b/src/prefect/tasks/control_flow/conditional.py
@@ -56,6 +56,24 @@
     skipped. Any tasks downstream of the skipped tasks are also skipped unless they set
     `skip_on_upstream_skip=False`.
 
+    Example:
+    ```python
+    @task
+    def condition():
+        return "b"    # returning 'b' will take the b_branch
+
+    @task
+    def a_branch():
+        return "A Branch"
+
+    @task
+    def b_branch():
+        return "B Branch"
+
+    with Flow("switch-flow") as flow:
+        switch(condition, dict(a=a_branch, b=b_branch))
+    ```
+
     Args:
         - condition (Task): a task whose result forms the condition for the switch
         - cases (Dict[Any, Task]): a dict representing the "case" statements of the switch.

{"golden_diff": "diff --git a/src/prefect/tasks/control_flow/conditional.py b/src/prefect/tasks/control_flow/conditional.py\n--- a/src/prefect/tasks/control_flow/conditional.py\n+++ b/src/prefect/tasks/control_flow/conditional.py\n@@ -56,6 +56,24 @@\n     skipped. Any tasks downstream of the skipped tasks are also skipped unless they set\n     `skip_on_upstream_skip=False`.\n \n+    Example:\n+    ```python\n+    @task\n+    def condition():\n+        return \"b\"    # returning 'b' will take the b_branch\n+\n+    @task\n+    def a_branch():\n+        return \"A Branch\"\n+\n+    @task\n+    def b_branch():\n+        return \"B Branch\"\n+\n+    with Flow(\"switch-flow\") as flow:\n+        switch(condition, dict(a=a_branch, b=b_branch))\n+    ```\n+\n     Args:\n         - condition (Task): a task whose result forms the condition for the switch\n         - cases (Dict[Any, Task]): a dict representing the \"case\" statements of the switch.\n", "issue": "Add example code block to `switch` docstring\nI recently realized I hadn't touched the `switch` code in a long time, and I would've really appreciated an example to work off of.  Instead, I ended up looking at our tests which most users won't want to do.  Relevant doc: https://docs.prefect.io/api/unreleased/tasks/control_flow.html#prefect-tasks-control-flow-conditional-switch\n", "before_files": [{"content": "from typing import Any, Dict\n\nimport prefect\nfrom prefect import Task\nfrom prefect.engine import signals\nfrom prefect.engine.result import NoResult\n\n__all__ = [\"switch\", \"ifelse\"]\n\n\nclass Merge(Task):\n    def __init__(self, **kwargs) -> None:\n        if kwargs.setdefault(\"skip_on_upstream_skip\", False):\n            raise ValueError(\"Merge tasks must have `skip_on_upstream_skip=False`.\")\n        super().__init__(**kwargs)\n\n    def run(self, **task_results: Any) -> Any:\n        return next((v for v in task_results.values() if v != NoResult), None)\n\n\nclass CompareValue(Task):\n    \"\"\"\n    This task stores a `value` at initialization and compares it to a `value` received at runtime.\n    If the values don't match, it raises a SKIP exception.\n\n    Args:\n        - value (Any): the value this task will attempt to match when it runs\n        - **kwargs: keyword arguments for the Task\n    \"\"\"\n\n    def __init__(self, value: Any, **kwargs: Any):\n        self.value = value\n        kwargs.setdefault(\"name\", 'CompareValue: \"{}\"'.format(value))\n        super().__init__(**kwargs)\n\n    def run(self, value: Any) -> None:\n        \"\"\"\n        Raises a SKIP signal if the passed value does not match the task's match value;\n        succeeds silently otherwise.\n\n        Args:\n            - value (Any): the value that will be matched against the task's value.\n        \"\"\"\n        if value != self.value:\n            raise signals.SKIP(\n                'Provided value \"{}\" did not match \"{}\"'.format(value, self.value)\n            )\n\n\ndef switch(condition: Task, cases: Dict[Any, Task]) -> None:\n    \"\"\"\n    Adds a SWITCH to a workflow.\n\n    The condition task is evaluated and the result is compared to the keys of the cases\n    dictionary. The task corresponding to the matching key is run; all other tasks are\n    skipped. Any tasks downstream of the skipped tasks are also skipped unless they set\n    `skip_on_upstream_skip=False`.\n\n    Args:\n        - condition (Task): a task whose result forms the condition for the switch\n        - cases (Dict[Any, Task]): a dict representing the \"case\" statements of the switch.\n            The value of the `condition` task will be compared to the keys of this dict, and\n            the matching task will be executed.\n\n    Raises:\n        - PrefectWarning: if any of the tasks in \"cases\" have upstream dependencies,\n            then this task will warn that those upstream tasks may run whether or not the switch condition matches their branch. The most common cause of this\n            is passing a list of tasks as one of the cases, which adds the `List` task\n            to the switch condition but leaves the tasks themselves upstream.\n    \"\"\"\n\n    with prefect.tags(\"switch\"):\n        for value, task in cases.items():\n            task = prefect.utilities.tasks.as_task(task)\n            match_condition = CompareValue(value=value).bind(value=condition)\n            task.set_dependencies(upstream_tasks=[match_condition])\n\n\ndef ifelse(condition: Task, true_task: Task, false_task: Task) -> None:\n    \"\"\"\n    Builds a conditional branch into a workflow.\n\n    If the condition evaluates True(ish), the true_task will run. If it\n    evaluates False(ish), the false_task will run. The task doesn't run is Skipped, as are\n    all downstream tasks that don't set `skip_on_upstream_skip=False`.\n\n    Args:\n        - condition (Task): a task whose boolean result forms the condition for the ifelse\n        - true_task (Task): a task that will be executed if the condition is True\n        - false_task (Task): a task that will be executed if the condition is False\n    \"\"\"\n\n    switch(condition=condition, cases={True: true_task, False: false_task})\n\n\ndef merge(*tasks: Task) -> Task:\n    \"\"\"\n    Merges conditional branches back together.\n\n    A conditional branch in a flow results in one or more tasks proceeding and one or\n    more tasks skipping. It is often convenient to merge those branches back into a\n    single result. This function is a simple way to achieve that goal.\n\n    The merge will return the first real result it encounters, or `None`. If multiple\n    tasks might return a result, group them with a list.\n\n    Example:\n        ```python\n        with Flow(\"My Flow\"):\n            true_branch = ActionIfTrue()\n            false_branch = ActionIfFalse()\n            ifelse(CheckCondition(), true_branch, false_branch)\n\n            merged_result = merge(true_branch, false_branch)\n        ```\n\n    Args:\n        - *tasks (Task): tasks whose results should be merged into a single result. The tasks are\n            assumed to all sit downstream of different `switch` branches, such that only\n            one of them will contain a result and the others will all be skipped.\n\n    Returns:\n        - Task: a Task representing the merged result.\n\n    \"\"\"\n    return Merge().bind(**{\"task_{}\".format(i + 1): t for i, t in enumerate(tasks)})\n", "path": "src/prefect/tasks/control_flow/conditional.py"}], "after_files": [{"content": "from typing import Any, Dict\n\nimport prefect\nfrom prefect import Task\nfrom prefect.engine import signals\nfrom prefect.engine.result import NoResult\n\n__all__ = [\"switch\", \"ifelse\"]\n\n\nclass Merge(Task):\n    def __init__(self, **kwargs) -> None:\n        if kwargs.setdefault(\"skip_on_upstream_skip\", False):\n            raise ValueError(\"Merge tasks must have `skip_on_upstream_skip=False`.\")\n        super().__init__(**kwargs)\n\n    def run(self, **task_results: Any) -> Any:\n        return next((v for v in task_results.values() if v != NoResult), None)\n\n\nclass CompareValue(Task):\n    \"\"\"\n    This task stores a `value` at initialization and compares it to a `value` received at runtime.\n    If the values don't match, it raises a SKIP exception.\n\n    Args:\n        - value (Any): the value this task will attempt to match when it runs\n        - **kwargs: keyword arguments for the Task\n    \"\"\"\n\n    def __init__(self, value: Any, **kwargs: Any):\n        self.value = value\n        kwargs.setdefault(\"name\", 'CompareValue: \"{}\"'.format(value))\n        super().__init__(**kwargs)\n\n    def run(self, value: Any) -> None:\n        \"\"\"\n        Raises a SKIP signal if the passed value does not match the task's match value;\n        succeeds silently otherwise.\n\n        Args:\n            - value (Any): the value that will be matched against the task's value.\n        \"\"\"\n        if value != self.value:\n            raise signals.SKIP(\n                'Provided value \"{}\" did not match \"{}\"'.format(value, self.value)\n            )\n\n\ndef switch(condition: Task, cases: Dict[Any, Task]) -> None:\n    \"\"\"\n    Adds a SWITCH to a workflow.\n\n    The condition task is evaluated and the result is compared to the keys of the cases\n    dictionary. The task corresponding to the matching key is run; all other tasks are\n    skipped. Any tasks downstream of the skipped tasks are also skipped unless they set\n    `skip_on_upstream_skip=False`.\n\n    Example:\n    ```python\n    @task\n    def condition():\n        return \"b\"    # returning 'b' will take the b_branch\n\n    @task\n    def a_branch():\n        return \"A Branch\"\n\n    @task\n    def b_branch():\n        return \"B Branch\"\n\n    with Flow(\"switch-flow\") as flow:\n        switch(condition, dict(a=a_branch, b=b_branch))\n    ```\n\n    Args:\n        - condition (Task): a task whose result forms the condition for the switch\n        - cases (Dict[Any, Task]): a dict representing the \"case\" statements of the switch.\n            The value of the `condition` task will be compared to the keys of this dict, and\n            the matching task will be executed.\n\n    Raises:\n        - PrefectWarning: if any of the tasks in \"cases\" have upstream dependencies,\n            then this task will warn that those upstream tasks may run whether or not the switch condition matches their branch. The most common cause of this\n            is passing a list of tasks as one of the cases, which adds the `List` task\n            to the switch condition but leaves the tasks themselves upstream.\n    \"\"\"\n\n    with prefect.tags(\"switch\"):\n        for value, task in cases.items():\n            task = prefect.utilities.tasks.as_task(task)\n            match_condition = CompareValue(value=value).bind(value=condition)\n            task.set_dependencies(upstream_tasks=[match_condition])\n\n\ndef ifelse(condition: Task, true_task: Task, false_task: Task) -> None:\n    \"\"\"\n    Builds a conditional branch into a workflow.\n\n    If the condition evaluates True(ish), the true_task will run. If it\n    evaluates False(ish), the false_task will run. The task doesn't run is Skipped, as are\n    all downstream tasks that don't set `skip_on_upstream_skip=False`.\n\n    Args:\n        - condition (Task): a task whose boolean result forms the condition for the ifelse\n        - true_task (Task): a task that will be executed if the condition is True\n        - false_task (Task): a task that will be executed if the condition is False\n    \"\"\"\n\n    switch(condition=condition, cases={True: true_task, False: false_task})\n\n\ndef merge(*tasks: Task) -> Task:\n    \"\"\"\n    Merges conditional branches back together.\n\n    A conditional branch in a flow results in one or more tasks proceeding and one or\n    more tasks skipping. It is often convenient to merge those branches back into a\n    single result. This function is a simple way to achieve that goal.\n\n    The merge will return the first real result it encounters, or `None`. If multiple\n    tasks might return a result, group them with a list.\n\n    Example:\n        ```python\n        with Flow(\"My Flow\"):\n            true_branch = ActionIfTrue()\n            false_branch = ActionIfFalse()\n            ifelse(CheckCondition(), true_branch, false_branch)\n\n            merged_result = merge(true_branch, false_branch)\n        ```\n\n    Args:\n        - *tasks (Task): tasks whose results should be merged into a single result. The tasks are\n            assumed to all sit downstream of different `switch` branches, such that only\n            one of them will contain a result and the others will all be skipped.\n\n    Returns:\n        - Task: a Task representing the merged result.\n\n    \"\"\"\n    return Merge().bind(**{\"task_{}\".format(i + 1): t for i, t in enumerate(tasks)})\n", "path": "src/prefect/tasks/control_flow/conditional.py"}]}