We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
NameError: name 'Blueprint' is not defined
Hi!

I wanted to try the project from the "quickstart" but I hit

>NameError: name 'Blueprint' is not defined

After running these steps:

```bash
pip install -e .
mkdir ~/data
mephisto config core.main_data_directory ~/data
mephisto check
# OK
cd examples/simple_static_task
python static_test_script.py
```

Any idea? Seems to be related to Flask.

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `mephisto/abstractions/blueprints/static_html_task/static_html_blueprint.py`
Content:
```
1 #!/usr/bin/env python3
2 
3 # Copyright (c) Facebook, Inc. and its affiliates.
4 # This source code is licensed under the MIT license found in the
5 # LICENSE file in the root directory of this source tree.
6 
7 from mephisto.abstractions.blueprints.abstract.static_task.static_blueprint import (
8     StaticBlueprint,
9     StaticBlueprintArgs,
10 )
11 from dataclasses import dataclass, field
12 from omegaconf import MISSING, DictConfig
13 from mephisto.abstractions.blueprints.static_html_task.static_html_task_builder import (
14     StaticHTMLTaskBuilder,
15 )
16 from mephisto.operations.registry import register_mephisto_abstraction
17 
18 import os
19 import time
20 import csv
21 import types
22 
23 from typing import ClassVar, List, Type, Any, Dict, Iterable, Optional, TYPE_CHECKING
24 
25 if TYPE_CHECKING:
26     from mephisto.data_model.task_run import TaskRun
27     from mephisto.data_model.blueprint import (
28         AgentState,
29         TaskRunner,
30         TaskBuilder,
31         SharedTaskState,
32     )
33     from mephisto.data_model.assignment import Assignment
34     from mephisto.data_model.agent import OnboardingAgent
35     from mephisto.data_model.worker import Worker
36 
37 BLUEPRINT_TYPE = "static_task"
38 
39 
40 @dataclass
41 class StaticHTMLBlueprintArgs(StaticBlueprintArgs):
42     """
43     Adds required options for StaticBlueprints.
44     task_source points to the file intending to be deployed for this task
45     data_csv has the data to be deployed for this task.
46     """
47 
48     _blueprint_type: str = BLUEPRINT_TYPE
49     _group: str = field(
50         default="StaticBlueprint",
51         metadata={
52             "help": (
53                 "Tasks launched from static blueprints need a "
54                 "source html file to display to workers, as well as a csv "
55                 "containing values that will be inserted into templates in "
56                 "the html. "
57             )
58         },
59     )
60     task_source: str = field(
61         default=MISSING,
62         metadata={
63             "help": "Path to source HTML file for the task being run",
64             "required": True,
65         },
66     )
67     preview_source: Optional[str] = field(
68         default=MISSING,
69         metadata={"help": "Optional path to source HTML file to preview the task"},
70     )
71     onboarding_source: Optional[str] = field(
72         default=MISSING,
73         metadata={"help": "Optional path to source HTML file to onboarding the task"},
74     )
75 
76 
77 @register_mephisto_abstraction()
78 class StaticHTMLBlueprint(StaticBlueprint):
79     """Blueprint for a task that runs off of a built react javascript bundle"""
80 
81     TaskBuilderClass = StaticHTMLTaskBuilder
82     ArgsClass = StaticHTMLBlueprintArgs
83     BLUEPRINT_TYPE = BLUEPRINT_TYPE
84 
85     def __init__(
86         self, task_run: "TaskRun", args: "DictConfig", shared_state: "SharedTaskState"
87     ):
88         super().__init__(task_run, args, shared_state)
89         self.html_file = os.path.expanduser(args.blueprint.task_source)
90         if not os.path.exists(self.html_file):
91             raise FileNotFoundError(
92                 f"Specified html file {self.html_file} was not found from {os.getcwd()}"
93             )
94 
95         self.onboarding_html_file = args.blueprint.get("onboarding_source", None)
96         if self.onboarding_html_file is not None:
97             self.onboarding_html_file = os.path.expanduser(self.onboarding_html_file)
98             if not os.path.exists(self.onboarding_html_file):
99                 raise FileNotFoundError(
100                     f"Specified onboarding html file {self.onboarding_html_file} was not found from {os.getcwd()}"
101                 )
102 
103         task_file_name = os.path.basename(self.html_file)
104         for entry in self._initialization_data_dicts:
105             entry["html"] = task_file_name
106 
107     @classmethod
108     def assert_task_args(cls, args: DictConfig, shared_state: "SharedTaskState"):
109         """Ensure that the data can be properly loaded"""
110         Blueprint.assert_task_args(args, shared_state)
111         blue_args = args.blueprint
112         if isinstance(shared_state.static_task_data, types.GeneratorType):
113             raise AssertionError("You can't launch an HTML static task on a generator")
114         if blue_args.get("data_csv", None) is not None:
115             csv_file = os.path.expanduser(blue_args.data_csv)
116             assert os.path.exists(
117                 csv_file
118             ), f"Provided csv file {csv_file} doesn't exist"
119         elif blue_args.get("data_json", None) is not None:
120             json_file = os.path.expanduser(blue_args.data_json)
121             assert os.path.exists(
122                 json_file
123             ), f"Provided JSON file {json_file} doesn't exist"
124         elif blue_args.get("data_jsonl", None) is not None:
125             jsonl_file = os.path.expanduser(blue_args.data_jsonl)
126             assert os.path.exists(
127                 jsonl_file
128             ), f"Provided JSON-L file {jsonl_file} doesn't exist"
129         elif shared_state.static_task_data is not None:
130             assert (
131                 len(shared_state.static_task_data) > 0
132             ), "Length of data dict provided was 0"
133         else:
134             raise AssertionError(
135                 "Must provide one of a data csv, json, json-L, or a list of tasks"
136             )
137 
138         if blue_args.get("onboarding_qualification", None) is not None:
139             assert blue_args.get("onboarding_source", None) is not None, (
140                 "Must use onboarding html with an onboarding qualification to "
141                 "use onboarding."
142             )
143             assert shared_state.validate_onboarding is not None, (
144                 "Must use an onboarding validation function to use onboarding "
145                 "with static tasks."
146             )
147
```
--- 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/mephisto/abstractions/blueprints/static_html_task/static_html_blueprint.py b/mephisto/abstractions/blueprints/static_html_task/static_html_blueprint.py
--- a/mephisto/abstractions/blueprints/static_html_task/static_html_blueprint.py
+++ b/mephisto/abstractions/blueprints/static_html_task/static_html_blueprint.py
@@ -10,6 +10,7 @@
 )
 from dataclasses import dataclass, field
 from omegaconf import MISSING, DictConfig
+from mephisto.abstractions.blueprint import Blueprint
 from mephisto.abstractions.blueprints.static_html_task.static_html_task_builder import (
     StaticHTMLTaskBuilder,
 )

{"golden_diff": "diff --git a/mephisto/abstractions/blueprints/static_html_task/static_html_blueprint.py b/mephisto/abstractions/blueprints/static_html_task/static_html_blueprint.py\n--- a/mephisto/abstractions/blueprints/static_html_task/static_html_blueprint.py\n+++ b/mephisto/abstractions/blueprints/static_html_task/static_html_blueprint.py\n@@ -10,6 +10,7 @@\n )\n from dataclasses import dataclass, field\n from omegaconf import MISSING, DictConfig\n+from mephisto.abstractions.blueprint import Blueprint\n from mephisto.abstractions.blueprints.static_html_task.static_html_task_builder import (\n     StaticHTMLTaskBuilder,\n )\n", "issue": "NameError: name 'Blueprint' is not defined\nHi!\r\n\r\nI wanted to try the project from the \"quickstart\" but I hit\r\n\r\n>NameError: name 'Blueprint' is not defined\r\n\r\nAfter running these steps:\r\n\r\n```bash\r\npip install -e .\r\nmkdir ~/data\r\nmephisto config core.main_data_directory ~/data\r\nmephisto check\r\n# OK\r\ncd examples/simple_static_task\r\npython static_test_script.py\r\n```\r\n\r\nAny idea? Seems to be related to Flask.\n", "before_files": [{"content": "#!/usr/bin/env python3\n\n# Copyright (c) Facebook, Inc. and its affiliates.\n# This source code is licensed under the MIT license found in the\n# LICENSE file in the root directory of this source tree.\n\nfrom mephisto.abstractions.blueprints.abstract.static_task.static_blueprint import (\n    StaticBlueprint,\n    StaticBlueprintArgs,\n)\nfrom dataclasses import dataclass, field\nfrom omegaconf import MISSING, DictConfig\nfrom mephisto.abstractions.blueprints.static_html_task.static_html_task_builder import (\n    StaticHTMLTaskBuilder,\n)\nfrom mephisto.operations.registry import register_mephisto_abstraction\n\nimport os\nimport time\nimport csv\nimport types\n\nfrom typing import ClassVar, List, Type, Any, Dict, Iterable, Optional, TYPE_CHECKING\n\nif TYPE_CHECKING:\n    from mephisto.data_model.task_run import TaskRun\n    from mephisto.data_model.blueprint import (\n        AgentState,\n        TaskRunner,\n        TaskBuilder,\n        SharedTaskState,\n    )\n    from mephisto.data_model.assignment import Assignment\n    from mephisto.data_model.agent import OnboardingAgent\n    from mephisto.data_model.worker import Worker\n\nBLUEPRINT_TYPE = \"static_task\"\n\n\n@dataclass\nclass StaticHTMLBlueprintArgs(StaticBlueprintArgs):\n    \"\"\"\n    Adds required options for StaticBlueprints.\n    task_source points to the file intending to be deployed for this task\n    data_csv has the data to be deployed for this task.\n    \"\"\"\n\n    _blueprint_type: str = BLUEPRINT_TYPE\n    _group: str = field(\n        default=\"StaticBlueprint\",\n        metadata={\n            \"help\": (\n                \"Tasks launched from static blueprints need a \"\n                \"source html file to display to workers, as well as a csv \"\n                \"containing values that will be inserted into templates in \"\n                \"the html. \"\n            )\n        },\n    )\n    task_source: str = field(\n        default=MISSING,\n        metadata={\n            \"help\": \"Path to source HTML file for the task being run\",\n            \"required\": True,\n        },\n    )\n    preview_source: Optional[str] = field(\n        default=MISSING,\n        metadata={\"help\": \"Optional path to source HTML file to preview the task\"},\n    )\n    onboarding_source: Optional[str] = field(\n        default=MISSING,\n        metadata={\"help\": \"Optional path to source HTML file to onboarding the task\"},\n    )\n\n\n@register_mephisto_abstraction()\nclass StaticHTMLBlueprint(StaticBlueprint):\n    \"\"\"Blueprint for a task that runs off of a built react javascript bundle\"\"\"\n\n    TaskBuilderClass = StaticHTMLTaskBuilder\n    ArgsClass = StaticHTMLBlueprintArgs\n    BLUEPRINT_TYPE = BLUEPRINT_TYPE\n\n    def __init__(\n        self, task_run: \"TaskRun\", args: \"DictConfig\", shared_state: \"SharedTaskState\"\n    ):\n        super().__init__(task_run, args, shared_state)\n        self.html_file = os.path.expanduser(args.blueprint.task_source)\n        if not os.path.exists(self.html_file):\n            raise FileNotFoundError(\n                f\"Specified html file {self.html_file} was not found from {os.getcwd()}\"\n            )\n\n        self.onboarding_html_file = args.blueprint.get(\"onboarding_source\", None)\n        if self.onboarding_html_file is not None:\n            self.onboarding_html_file = os.path.expanduser(self.onboarding_html_file)\n            if not os.path.exists(self.onboarding_html_file):\n                raise FileNotFoundError(\n                    f\"Specified onboarding html file {self.onboarding_html_file} was not found from {os.getcwd()}\"\n                )\n\n        task_file_name = os.path.basename(self.html_file)\n        for entry in self._initialization_data_dicts:\n            entry[\"html\"] = task_file_name\n\n    @classmethod\n    def assert_task_args(cls, args: DictConfig, shared_state: \"SharedTaskState\"):\n        \"\"\"Ensure that the data can be properly loaded\"\"\"\n        Blueprint.assert_task_args(args, shared_state)\n        blue_args = args.blueprint\n        if isinstance(shared_state.static_task_data, types.GeneratorType):\n            raise AssertionError(\"You can't launch an HTML static task on a generator\")\n        if blue_args.get(\"data_csv\", None) is not None:\n            csv_file = os.path.expanduser(blue_args.data_csv)\n            assert os.path.exists(\n                csv_file\n            ), f\"Provided csv file {csv_file} doesn't exist\"\n        elif blue_args.get(\"data_json\", None) is not None:\n            json_file = os.path.expanduser(blue_args.data_json)\n            assert os.path.exists(\n                json_file\n            ), f\"Provided JSON file {json_file} doesn't exist\"\n        elif blue_args.get(\"data_jsonl\", None) is not None:\n            jsonl_file = os.path.expanduser(blue_args.data_jsonl)\n            assert os.path.exists(\n                jsonl_file\n            ), f\"Provided JSON-L file {jsonl_file} doesn't exist\"\n        elif shared_state.static_task_data is not None:\n            assert (\n                len(shared_state.static_task_data) > 0\n            ), \"Length of data dict provided was 0\"\n        else:\n            raise AssertionError(\n                \"Must provide one of a data csv, json, json-L, or a list of tasks\"\n            )\n\n        if blue_args.get(\"onboarding_qualification\", None) is not None:\n            assert blue_args.get(\"onboarding_source\", None) is not None, (\n                \"Must use onboarding html with an onboarding qualification to \"\n                \"use onboarding.\"\n            )\n            assert shared_state.validate_onboarding is not None, (\n                \"Must use an onboarding validation function to use onboarding \"\n                \"with static tasks.\"\n            )\n", "path": "mephisto/abstractions/blueprints/static_html_task/static_html_blueprint.py"}], "after_files": [{"content": "#!/usr/bin/env python3\n\n# Copyright (c) Facebook, Inc. and its affiliates.\n# This source code is licensed under the MIT license found in the\n# LICENSE file in the root directory of this source tree.\n\nfrom mephisto.abstractions.blueprints.abstract.static_task.static_blueprint import (\n    StaticBlueprint,\n    StaticBlueprintArgs,\n)\nfrom dataclasses import dataclass, field\nfrom omegaconf import MISSING, DictConfig\nfrom mephisto.abstractions.blueprint import Blueprint\nfrom mephisto.abstractions.blueprints.static_html_task.static_html_task_builder import (\n    StaticHTMLTaskBuilder,\n)\nfrom mephisto.operations.registry import register_mephisto_abstraction\n\nimport os\nimport time\nimport csv\nimport types\n\nfrom typing import ClassVar, List, Type, Any, Dict, Iterable, Optional, TYPE_CHECKING\n\nif TYPE_CHECKING:\n    from mephisto.data_model.task_run import TaskRun\n    from mephisto.data_model.blueprint import (\n        AgentState,\n        TaskRunner,\n        TaskBuilder,\n        SharedTaskState,\n    )\n    from mephisto.data_model.assignment import Assignment\n    from mephisto.data_model.agent import OnboardingAgent\n    from mephisto.data_model.worker import Worker\n\nBLUEPRINT_TYPE = \"static_task\"\n\n\n@dataclass\nclass StaticHTMLBlueprintArgs(StaticBlueprintArgs):\n    \"\"\"\n    Adds required options for StaticBlueprints.\n    task_source points to the file intending to be deployed for this task\n    data_csv has the data to be deployed for this task.\n    \"\"\"\n\n    _blueprint_type: str = BLUEPRINT_TYPE\n    _group: str = field(\n        default=\"StaticBlueprint\",\n        metadata={\n            \"help\": (\n                \"Tasks launched from static blueprints need a \"\n                \"source html file to display to workers, as well as a csv \"\n                \"containing values that will be inserted into templates in \"\n                \"the html. \"\n            )\n        },\n    )\n    task_source: str = field(\n        default=MISSING,\n        metadata={\n            \"help\": \"Path to source HTML file for the task being run\",\n            \"required\": True,\n        },\n    )\n    preview_source: Optional[str] = field(\n        default=MISSING,\n        metadata={\"help\": \"Optional path to source HTML file to preview the task\"},\n    )\n    onboarding_source: Optional[str] = field(\n        default=MISSING,\n        metadata={\"help\": \"Optional path to source HTML file to onboarding the task\"},\n    )\n\n\n@register_mephisto_abstraction()\nclass StaticHTMLBlueprint(StaticBlueprint):\n    \"\"\"Blueprint for a task that runs off of a built react javascript bundle\"\"\"\n\n    TaskBuilderClass = StaticHTMLTaskBuilder\n    ArgsClass = StaticHTMLBlueprintArgs\n    BLUEPRINT_TYPE = BLUEPRINT_TYPE\n\n    def __init__(\n        self, task_run: \"TaskRun\", args: \"DictConfig\", shared_state: \"SharedTaskState\"\n    ):\n        super().__init__(task_run, args, shared_state)\n        self.html_file = os.path.expanduser(args.blueprint.task_source)\n        if not os.path.exists(self.html_file):\n            raise FileNotFoundError(\n                f\"Specified html file {self.html_file} was not found from {os.getcwd()}\"\n            )\n\n        self.onboarding_html_file = args.blueprint.get(\"onboarding_source\", None)\n        if self.onboarding_html_file is not None:\n            self.onboarding_html_file = os.path.expanduser(self.onboarding_html_file)\n            if not os.path.exists(self.onboarding_html_file):\n                raise FileNotFoundError(\n                    f\"Specified onboarding html file {self.onboarding_html_file} was not found from {os.getcwd()}\"\n                )\n\n        task_file_name = os.path.basename(self.html_file)\n        for entry in self._initialization_data_dicts:\n            entry[\"html\"] = task_file_name\n\n    @classmethod\n    def assert_task_args(cls, args: DictConfig, shared_state: \"SharedTaskState\"):\n        \"\"\"Ensure that the data can be properly loaded\"\"\"\n        Blueprint.assert_task_args(args, shared_state)\n        blue_args = args.blueprint\n        if isinstance(shared_state.static_task_data, types.GeneratorType):\n            raise AssertionError(\"You can't launch an HTML static task on a generator\")\n        if blue_args.get(\"data_csv\", None) is not None:\n            csv_file = os.path.expanduser(blue_args.data_csv)\n            assert os.path.exists(\n                csv_file\n            ), f\"Provided csv file {csv_file} doesn't exist\"\n        elif blue_args.get(\"data_json\", None) is not None:\n            json_file = os.path.expanduser(blue_args.data_json)\n            assert os.path.exists(\n                json_file\n            ), f\"Provided JSON file {json_file} doesn't exist\"\n        elif blue_args.get(\"data_jsonl\", None) is not None:\n            jsonl_file = os.path.expanduser(blue_args.data_jsonl)\n            assert os.path.exists(\n                jsonl_file\n            ), f\"Provided JSON-L file {jsonl_file} doesn't exist\"\n        elif shared_state.static_task_data is not None:\n            assert (\n                len(shared_state.static_task_data) > 0\n            ), \"Length of data dict provided was 0\"\n        else:\n            raise AssertionError(\n                \"Must provide one of a data csv, json, json-L, or a list of tasks\"\n            )\n\n        if blue_args.get(\"onboarding_qualification\", None) is not None:\n            assert blue_args.get(\"onboarding_source\", None) is not None, (\n                \"Must use onboarding html with an onboarding qualification to \"\n                \"use onboarding.\"\n            )\n            assert shared_state.validate_onboarding is not None, (\n                \"Must use an onboarding validation function to use onboarding \"\n                \"with static tasks.\"\n            )\n", "path": "mephisto/abstractions/blueprints/static_html_task/static_html_blueprint.py"}]}