We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
prevent_initial_call in callback throws exception [BUG]
Thank you so much for helping improve the quality of Dash!

We do our best to catch bugs during the release process, but we rely on your help to find the ones that slip through.


**Describe your context**
Please provide us your environment so we can easily reproduce the issue.

-  replace the result of `pip list | grep dash` below
```
dash                      1.15.0
dash-bootstrap-components 0.9.2
dash-core-components      1.11.0
dash-html-components      1.1.0
dash-renderer             1.7.0
dash-table                4.10.0
```

**Describe the bug**

With the release of Dash 1.15.0. Setting prevent_initial_call in a callback now throws an exception.
It appears prevent_initial_call must be explicitly provided as a named parameter ex. prevent_initial_call=True. This was not previously the case if all parameters (Output, Input, State, and prevent_initial_call) were provided.

  File "C:\Program Files\Python36\lib\site-packages\dash\dash.py", line 980, in callback
    _args, _kwargs
  File "C:\Program Files\Python36\lib\site-packages\dash\dependencies.py", line 159, in handle_callback_args
    prevent_initial_call = args.pop()
AttributeError: 'tuple' object has no attribute 'pop' 

**Expected behavior**

An exception should not be thrown.


prevent_initial_call in callback throws exception [BUG]
Thank you so much for helping improve the quality of Dash!

We do our best to catch bugs during the release process, but we rely on your help to find the ones that slip through.


**Describe your context**
Please provide us your environment so we can easily reproduce the issue.

-  replace the result of `pip list | grep dash` below
```
dash                      1.15.0
dash-bootstrap-components 0.9.2
dash-core-components      1.11.0
dash-html-components      1.1.0
dash-renderer             1.7.0
dash-table                4.10.0
```

**Describe the bug**

With the release of Dash 1.15.0. Setting prevent_initial_call in a callback now throws an exception.
It appears prevent_initial_call must be explicitly provided as a named parameter ex. prevent_initial_call=True. This was not previously the case if all parameters (Output, Input, State, and prevent_initial_call) were provided.

  File "C:\Program Files\Python36\lib\site-packages\dash\dash.py", line 980, in callback
    _args, _kwargs
  File "C:\Program Files\Python36\lib\site-packages\dash\dependencies.py", line 159, in handle_callback_args
    prevent_initial_call = args.pop()
AttributeError: 'tuple' object has no attribute 'pop' 

**Expected behavior**

An exception should not be thrown.



--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `dash/dependencies.py`
Content:
```
1 import json
2 
3 from ._validate import validate_callback
4 
5 
6 class _Wildcard:  # pylint: disable=too-few-public-methods
7     def __init__(self, name):
8         self._name = name
9 
10     def __str__(self):
11         return self._name
12 
13     def __repr__(self):
14         return "<{}>".format(self)
15 
16     def to_json(self):
17         # used in serializing wildcards - arrays are not allowed as
18         # id values, so make the wildcards look like length-1 arrays.
19         return '["{}"]'.format(self._name)
20 
21 
22 MATCH = _Wildcard("MATCH")
23 ALL = _Wildcard("ALL")
24 ALLSMALLER = _Wildcard("ALLSMALLER")
25 
26 
27 class DashDependency:  # pylint: disable=too-few-public-methods
28     def __init__(self, component_id, component_property):
29         self.component_id = component_id
30         self.component_property = component_property
31 
32     def __str__(self):
33         return "{}.{}".format(self.component_id_str(), self.component_property)
34 
35     def __repr__(self):
36         return "<{} `{}`>".format(self.__class__.__name__, self)
37 
38     def component_id_str(self):
39         i = self.component_id
40 
41         def _dump(v):
42             return json.dumps(v, sort_keys=True, separators=(",", ":"))
43 
44         def _json(k, v):
45             vstr = v.to_json() if hasattr(v, "to_json") else json.dumps(v)
46             return "{}:{}".format(json.dumps(k), vstr)
47 
48         if isinstance(i, dict):
49             return "{" + ",".join(_json(k, i[k]) for k in sorted(i)) + "}"
50 
51         return i
52 
53     def to_dict(self):
54         return {"id": self.component_id_str(), "property": self.component_property}
55 
56     def __eq__(self, other):
57         """
58         We use "==" to denote two deps that refer to the same prop on
59         the same component. In the case of wildcard deps, this means
60         the same prop on *at least one* of the same components.
61         """
62         return (
63             isinstance(other, DashDependency)
64             and self.component_property == other.component_property
65             and self._id_matches(other)
66         )
67 
68     def _id_matches(self, other):
69         my_id = self.component_id
70         other_id = other.component_id
71         self_dict = isinstance(my_id, dict)
72         other_dict = isinstance(other_id, dict)
73 
74         if self_dict != other_dict:
75             return False
76         if self_dict:
77             if set(my_id.keys()) != set(other_id.keys()):
78                 return False
79 
80             for k, v in my_id.items():
81                 other_v = other_id[k]
82                 if v == other_v:
83                     continue
84                 v_wild = isinstance(v, _Wildcard)
85                 other_wild = isinstance(other_v, _Wildcard)
86                 if v_wild or other_wild:
87                     if not (v_wild and other_wild):
88                         continue  # one wild, one not
89                     if v is ALL or other_v is ALL:
90                         continue  # either ALL
91                     if v is MATCH or other_v is MATCH:
92                         return False  # one MATCH, one ALLSMALLER
93                 else:
94                     return False
95             return True
96 
97         # both strings
98         return my_id == other_id
99 
100     def __hash__(self):
101         return hash(str(self))
102 
103 
104 class Output(DashDependency):  # pylint: disable=too-few-public-methods
105     """Output of a callback."""
106 
107     allowed_wildcards = (MATCH, ALL)
108 
109 
110 class Input(DashDependency):  # pylint: disable=too-few-public-methods
111     """Input of callback: trigger an update when it is updated."""
112 
113     allowed_wildcards = (MATCH, ALL, ALLSMALLER)
114 
115 
116 class State(DashDependency):  # pylint: disable=too-few-public-methods
117     """Use the value of a State in a callback but don't trigger updates."""
118 
119     allowed_wildcards = (MATCH, ALL, ALLSMALLER)
120 
121 
122 class ClientsideFunction:  # pylint: disable=too-few-public-methods
123     def __init__(self, namespace=None, function_name=None):
124 
125         if namespace.startswith("_dashprivate_"):
126             raise ValueError("Namespaces cannot start with '_dashprivate_'.")
127 
128         if namespace in ["PreventUpdate", "no_update"]:
129             raise ValueError(
130                 '"{}" is a forbidden namespace in' " dash_clientside.".format(namespace)
131             )
132 
133         self.namespace = namespace
134         self.function_name = function_name
135 
136     def __repr__(self):
137         return "ClientsideFunction({}, {})".format(self.namespace, self.function_name)
138 
139 
140 def extract_callback_args(args, kwargs, name, type_):
141     """Extract arguments for callback from a name and type"""
142     parameters = kwargs.get(name, [])
143     if parameters:
144         if not isinstance(parameters, (list, tuple)):
145             # accept a single item, not wrapped in a list, for any of the
146             # categories as a named arg (even though previously only output
147             # could be given unwrapped)
148             return [parameters]
149     else:
150         while args and isinstance(args[0], type_):
151             parameters.append(args.pop(0))
152     return parameters
153 
154 
155 def handle_callback_args(args, kwargs):
156     """Split args into outputs, inputs and states"""
157     prevent_initial_call = kwargs.get("prevent_initial_call", None)
158     if prevent_initial_call is None and args and isinstance(args[-1], bool):
159         prevent_initial_call = args.pop()
160 
161     # flatten args, to support the older syntax where outputs, inputs, and states
162     # each needed to be in their own list
163     flat_args = []
164     for arg in args:
165         flat_args += arg if isinstance(arg, (list, tuple)) else [arg]
166 
167     outputs = extract_callback_args(flat_args, kwargs, "output", Output)
168     validate_outputs = outputs
169     if len(outputs) == 1:
170         out0 = kwargs.get("output", args[0] if args else None)
171         if not isinstance(out0, (list, tuple)):
172             # unless it was explicitly provided as a list, a single output
173             # should be unwrapped. That ensures the return value of the
174             # callback is also not expected to be wrapped in a list.
175             outputs = outputs[0]
176 
177     inputs = extract_callback_args(flat_args, kwargs, "inputs", Input)
178     states = extract_callback_args(flat_args, kwargs, "state", State)
179 
180     types = Input, Output, State
181     validate_callback(validate_outputs, inputs, states, flat_args, types)
182 
183     return outputs, inputs, states, prevent_initial_call
184
```
--- 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/dash/dependencies.py b/dash/dependencies.py
--- a/dash/dependencies.py
+++ b/dash/dependencies.py
@@ -156,7 +156,7 @@
     """Split args into outputs, inputs and states"""
     prevent_initial_call = kwargs.get("prevent_initial_call", None)
     if prevent_initial_call is None and args and isinstance(args[-1], bool):
-        prevent_initial_call = args.pop()
+        args, prevent_initial_call = args[:-1], args[-1]
 
     # flatten args, to support the older syntax where outputs, inputs, and states
     # each needed to be in their own list

{"golden_diff": "diff --git a/dash/dependencies.py b/dash/dependencies.py\n--- a/dash/dependencies.py\n+++ b/dash/dependencies.py\n@@ -156,7 +156,7 @@\n     \"\"\"Split args into outputs, inputs and states\"\"\"\n     prevent_initial_call = kwargs.get(\"prevent_initial_call\", None)\n     if prevent_initial_call is None and args and isinstance(args[-1], bool):\n-        prevent_initial_call = args.pop()\n+        args, prevent_initial_call = args[:-1], args[-1]\n \n     # flatten args, to support the older syntax where outputs, inputs, and states\n     # each needed to be in their own list\n", "issue": "prevent_initial_call in callback throws exception [BUG]\nThank you so much for helping improve the quality of Dash!\r\n\r\nWe do our best to catch bugs during the release process, but we rely on your help to find the ones that slip through.\r\n\r\n\r\n**Describe your context**\r\nPlease provide us your environment so we can easily reproduce the issue.\r\n\r\n-  replace the result of `pip list | grep dash` below\r\n```\r\ndash                      1.15.0\r\ndash-bootstrap-components 0.9.2\r\ndash-core-components      1.11.0\r\ndash-html-components      1.1.0\r\ndash-renderer             1.7.0\r\ndash-table                4.10.0\r\n```\r\n\r\n**Describe the bug**\r\n\r\nWith the release of Dash 1.15.0. Setting prevent_initial_call in a callback now throws an exception.\r\nIt appears prevent_initial_call must be explicitly provided as a named parameter ex. prevent_initial_call=True. This was not previously the case if all parameters (Output, Input, State, and prevent_initial_call) were provided.\r\n\r\n  File \"C:\\Program Files\\Python36\\lib\\site-packages\\dash\\dash.py\", line 980, in callback\r\n    _args, _kwargs\r\n  File \"C:\\Program Files\\Python36\\lib\\site-packages\\dash\\dependencies.py\", line 159, in handle_callback_args\r\n    prevent_initial_call = args.pop()\r\nAttributeError: 'tuple' object has no attribute 'pop' \r\n\r\n**Expected behavior**\r\n\r\nAn exception should not be thrown.\r\n\r\n\nprevent_initial_call in callback throws exception [BUG]\nThank you so much for helping improve the quality of Dash!\r\n\r\nWe do our best to catch bugs during the release process, but we rely on your help to find the ones that slip through.\r\n\r\n\r\n**Describe your context**\r\nPlease provide us your environment so we can easily reproduce the issue.\r\n\r\n-  replace the result of `pip list | grep dash` below\r\n```\r\ndash                      1.15.0\r\ndash-bootstrap-components 0.9.2\r\ndash-core-components      1.11.0\r\ndash-html-components      1.1.0\r\ndash-renderer             1.7.0\r\ndash-table                4.10.0\r\n```\r\n\r\n**Describe the bug**\r\n\r\nWith the release of Dash 1.15.0. Setting prevent_initial_call in a callback now throws an exception.\r\nIt appears prevent_initial_call must be explicitly provided as a named parameter ex. prevent_initial_call=True. This was not previously the case if all parameters (Output, Input, State, and prevent_initial_call) were provided.\r\n\r\n  File \"C:\\Program Files\\Python36\\lib\\site-packages\\dash\\dash.py\", line 980, in callback\r\n    _args, _kwargs\r\n  File \"C:\\Program Files\\Python36\\lib\\site-packages\\dash\\dependencies.py\", line 159, in handle_callback_args\r\n    prevent_initial_call = args.pop()\r\nAttributeError: 'tuple' object has no attribute 'pop' \r\n\r\n**Expected behavior**\r\n\r\nAn exception should not be thrown.\r\n\r\n\n", "before_files": [{"content": "import json\n\nfrom ._validate import validate_callback\n\n\nclass _Wildcard:  # pylint: disable=too-few-public-methods\n    def __init__(self, name):\n        self._name = name\n\n    def __str__(self):\n        return self._name\n\n    def __repr__(self):\n        return \"<{}>\".format(self)\n\n    def to_json(self):\n        # used in serializing wildcards - arrays are not allowed as\n        # id values, so make the wildcards look like length-1 arrays.\n        return '[\"{}\"]'.format(self._name)\n\n\nMATCH = _Wildcard(\"MATCH\")\nALL = _Wildcard(\"ALL\")\nALLSMALLER = _Wildcard(\"ALLSMALLER\")\n\n\nclass DashDependency:  # pylint: disable=too-few-public-methods\n    def __init__(self, component_id, component_property):\n        self.component_id = component_id\n        self.component_property = component_property\n\n    def __str__(self):\n        return \"{}.{}\".format(self.component_id_str(), self.component_property)\n\n    def __repr__(self):\n        return \"<{} `{}`>\".format(self.__class__.__name__, self)\n\n    def component_id_str(self):\n        i = self.component_id\n\n        def _dump(v):\n            return json.dumps(v, sort_keys=True, separators=(\",\", \":\"))\n\n        def _json(k, v):\n            vstr = v.to_json() if hasattr(v, \"to_json\") else json.dumps(v)\n            return \"{}:{}\".format(json.dumps(k), vstr)\n\n        if isinstance(i, dict):\n            return \"{\" + \",\".join(_json(k, i[k]) for k in sorted(i)) + \"}\"\n\n        return i\n\n    def to_dict(self):\n        return {\"id\": self.component_id_str(), \"property\": self.component_property}\n\n    def __eq__(self, other):\n        \"\"\"\n        We use \"==\" to denote two deps that refer to the same prop on\n        the same component. In the case of wildcard deps, this means\n        the same prop on *at least one* of the same components.\n        \"\"\"\n        return (\n            isinstance(other, DashDependency)\n            and self.component_property == other.component_property\n            and self._id_matches(other)\n        )\n\n    def _id_matches(self, other):\n        my_id = self.component_id\n        other_id = other.component_id\n        self_dict = isinstance(my_id, dict)\n        other_dict = isinstance(other_id, dict)\n\n        if self_dict != other_dict:\n            return False\n        if self_dict:\n            if set(my_id.keys()) != set(other_id.keys()):\n                return False\n\n            for k, v in my_id.items():\n                other_v = other_id[k]\n                if v == other_v:\n                    continue\n                v_wild = isinstance(v, _Wildcard)\n                other_wild = isinstance(other_v, _Wildcard)\n                if v_wild or other_wild:\n                    if not (v_wild and other_wild):\n                        continue  # one wild, one not\n                    if v is ALL or other_v is ALL:\n                        continue  # either ALL\n                    if v is MATCH or other_v is MATCH:\n                        return False  # one MATCH, one ALLSMALLER\n                else:\n                    return False\n            return True\n\n        # both strings\n        return my_id == other_id\n\n    def __hash__(self):\n        return hash(str(self))\n\n\nclass Output(DashDependency):  # pylint: disable=too-few-public-methods\n    \"\"\"Output of a callback.\"\"\"\n\n    allowed_wildcards = (MATCH, ALL)\n\n\nclass Input(DashDependency):  # pylint: disable=too-few-public-methods\n    \"\"\"Input of callback: trigger an update when it is updated.\"\"\"\n\n    allowed_wildcards = (MATCH, ALL, ALLSMALLER)\n\n\nclass State(DashDependency):  # pylint: disable=too-few-public-methods\n    \"\"\"Use the value of a State in a callback but don't trigger updates.\"\"\"\n\n    allowed_wildcards = (MATCH, ALL, ALLSMALLER)\n\n\nclass ClientsideFunction:  # pylint: disable=too-few-public-methods\n    def __init__(self, namespace=None, function_name=None):\n\n        if namespace.startswith(\"_dashprivate_\"):\n            raise ValueError(\"Namespaces cannot start with '_dashprivate_'.\")\n\n        if namespace in [\"PreventUpdate\", \"no_update\"]:\n            raise ValueError(\n                '\"{}\" is a forbidden namespace in' \" dash_clientside.\".format(namespace)\n            )\n\n        self.namespace = namespace\n        self.function_name = function_name\n\n    def __repr__(self):\n        return \"ClientsideFunction({}, {})\".format(self.namespace, self.function_name)\n\n\ndef extract_callback_args(args, kwargs, name, type_):\n    \"\"\"Extract arguments for callback from a name and type\"\"\"\n    parameters = kwargs.get(name, [])\n    if parameters:\n        if not isinstance(parameters, (list, tuple)):\n            # accept a single item, not wrapped in a list, for any of the\n            # categories as a named arg (even though previously only output\n            # could be given unwrapped)\n            return [parameters]\n    else:\n        while args and isinstance(args[0], type_):\n            parameters.append(args.pop(0))\n    return parameters\n\n\ndef handle_callback_args(args, kwargs):\n    \"\"\"Split args into outputs, inputs and states\"\"\"\n    prevent_initial_call = kwargs.get(\"prevent_initial_call\", None)\n    if prevent_initial_call is None and args and isinstance(args[-1], bool):\n        prevent_initial_call = args.pop()\n\n    # flatten args, to support the older syntax where outputs, inputs, and states\n    # each needed to be in their own list\n    flat_args = []\n    for arg in args:\n        flat_args += arg if isinstance(arg, (list, tuple)) else [arg]\n\n    outputs = extract_callback_args(flat_args, kwargs, \"output\", Output)\n    validate_outputs = outputs\n    if len(outputs) == 1:\n        out0 = kwargs.get(\"output\", args[0] if args else None)\n        if not isinstance(out0, (list, tuple)):\n            # unless it was explicitly provided as a list, a single output\n            # should be unwrapped. That ensures the return value of the\n            # callback is also not expected to be wrapped in a list.\n            outputs = outputs[0]\n\n    inputs = extract_callback_args(flat_args, kwargs, \"inputs\", Input)\n    states = extract_callback_args(flat_args, kwargs, \"state\", State)\n\n    types = Input, Output, State\n    validate_callback(validate_outputs, inputs, states, flat_args, types)\n\n    return outputs, inputs, states, prevent_initial_call\n", "path": "dash/dependencies.py"}], "after_files": [{"content": "import json\n\nfrom ._validate import validate_callback\n\n\nclass _Wildcard:  # pylint: disable=too-few-public-methods\n    def __init__(self, name):\n        self._name = name\n\n    def __str__(self):\n        return self._name\n\n    def __repr__(self):\n        return \"<{}>\".format(self)\n\n    def to_json(self):\n        # used in serializing wildcards - arrays are not allowed as\n        # id values, so make the wildcards look like length-1 arrays.\n        return '[\"{}\"]'.format(self._name)\n\n\nMATCH = _Wildcard(\"MATCH\")\nALL = _Wildcard(\"ALL\")\nALLSMALLER = _Wildcard(\"ALLSMALLER\")\n\n\nclass DashDependency:  # pylint: disable=too-few-public-methods\n    def __init__(self, component_id, component_property):\n        self.component_id = component_id\n        self.component_property = component_property\n\n    def __str__(self):\n        return \"{}.{}\".format(self.component_id_str(), self.component_property)\n\n    def __repr__(self):\n        return \"<{} `{}`>\".format(self.__class__.__name__, self)\n\n    def component_id_str(self):\n        i = self.component_id\n\n        def _dump(v):\n            return json.dumps(v, sort_keys=True, separators=(\",\", \":\"))\n\n        def _json(k, v):\n            vstr = v.to_json() if hasattr(v, \"to_json\") else json.dumps(v)\n            return \"{}:{}\".format(json.dumps(k), vstr)\n\n        if isinstance(i, dict):\n            return \"{\" + \",\".join(_json(k, i[k]) for k in sorted(i)) + \"}\"\n\n        return i\n\n    def to_dict(self):\n        return {\"id\": self.component_id_str(), \"property\": self.component_property}\n\n    def __eq__(self, other):\n        \"\"\"\n        We use \"==\" to denote two deps that refer to the same prop on\n        the same component. In the case of wildcard deps, this means\n        the same prop on *at least one* of the same components.\n        \"\"\"\n        return (\n            isinstance(other, DashDependency)\n            and self.component_property == other.component_property\n            and self._id_matches(other)\n        )\n\n    def _id_matches(self, other):\n        my_id = self.component_id\n        other_id = other.component_id\n        self_dict = isinstance(my_id, dict)\n        other_dict = isinstance(other_id, dict)\n\n        if self_dict != other_dict:\n            return False\n        if self_dict:\n            if set(my_id.keys()) != set(other_id.keys()):\n                return False\n\n            for k, v in my_id.items():\n                other_v = other_id[k]\n                if v == other_v:\n                    continue\n                v_wild = isinstance(v, _Wildcard)\n                other_wild = isinstance(other_v, _Wildcard)\n                if v_wild or other_wild:\n                    if not (v_wild and other_wild):\n                        continue  # one wild, one not\n                    if v is ALL or other_v is ALL:\n                        continue  # either ALL\n                    if v is MATCH or other_v is MATCH:\n                        return False  # one MATCH, one ALLSMALLER\n                else:\n                    return False\n            return True\n\n        # both strings\n        return my_id == other_id\n\n    def __hash__(self):\n        return hash(str(self))\n\n\nclass Output(DashDependency):  # pylint: disable=too-few-public-methods\n    \"\"\"Output of a callback.\"\"\"\n\n    allowed_wildcards = (MATCH, ALL)\n\n\nclass Input(DashDependency):  # pylint: disable=too-few-public-methods\n    \"\"\"Input of callback: trigger an update when it is updated.\"\"\"\n\n    allowed_wildcards = (MATCH, ALL, ALLSMALLER)\n\n\nclass State(DashDependency):  # pylint: disable=too-few-public-methods\n    \"\"\"Use the value of a State in a callback but don't trigger updates.\"\"\"\n\n    allowed_wildcards = (MATCH, ALL, ALLSMALLER)\n\n\nclass ClientsideFunction:  # pylint: disable=too-few-public-methods\n    def __init__(self, namespace=None, function_name=None):\n\n        if namespace.startswith(\"_dashprivate_\"):\n            raise ValueError(\"Namespaces cannot start with '_dashprivate_'.\")\n\n        if namespace in [\"PreventUpdate\", \"no_update\"]:\n            raise ValueError(\n                '\"{}\" is a forbidden namespace in' \" dash_clientside.\".format(namespace)\n            )\n\n        self.namespace = namespace\n        self.function_name = function_name\n\n    def __repr__(self):\n        return \"ClientsideFunction({}, {})\".format(self.namespace, self.function_name)\n\n\ndef extract_callback_args(args, kwargs, name, type_):\n    \"\"\"Extract arguments for callback from a name and type\"\"\"\n    parameters = kwargs.get(name, [])\n    if parameters:\n        if not isinstance(parameters, (list, tuple)):\n            # accept a single item, not wrapped in a list, for any of the\n            # categories as a named arg (even though previously only output\n            # could be given unwrapped)\n            return [parameters]\n    else:\n        while args and isinstance(args[0], type_):\n            parameters.append(args.pop(0))\n    return parameters\n\n\ndef handle_callback_args(args, kwargs):\n    \"\"\"Split args into outputs, inputs and states\"\"\"\n    prevent_initial_call = kwargs.get(\"prevent_initial_call\", None)\n    if prevent_initial_call is None and args and isinstance(args[-1], bool):\n        args, prevent_initial_call = args[:-1], args[-1]\n\n    # flatten args, to support the older syntax where outputs, inputs, and states\n    # each needed to be in their own list\n    flat_args = []\n    for arg in args:\n        flat_args += arg if isinstance(arg, (list, tuple)) else [arg]\n\n    outputs = extract_callback_args(flat_args, kwargs, \"output\", Output)\n    validate_outputs = outputs\n    if len(outputs) == 1:\n        out0 = kwargs.get(\"output\", args[0] if args else None)\n        if not isinstance(out0, (list, tuple)):\n            # unless it was explicitly provided as a list, a single output\n            # should be unwrapped. That ensures the return value of the\n            # callback is also not expected to be wrapped in a list.\n            outputs = outputs[0]\n\n    inputs = extract_callback_args(flat_args, kwargs, \"inputs\", Input)\n    states = extract_callback_args(flat_args, kwargs, \"state\", State)\n\n    types = Input, Output, State\n    validate_callback(validate_outputs, inputs, states, flat_args, types)\n\n    return outputs, inputs, states, prevent_initial_call\n", "path": "dash/dependencies.py"}]}