We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Prefect serializes flows based on flow name ignoring project
Hi,

I searched the slack channel and did not find anything that pertained directly to this.  We use Prefect for two departments that have virtually the same flows, but different sources and different processing rules.  What we have found is that flows with the same name overwrite each other regardless of the project.  I am not sure if that is intended or if there is a way to work around this issue.

This is a minimal example that I confirmed in a fresh install of Prefect 0.14.0 running the server backend in docker with a local agent all on the same machine.

```
jaykae@DT-JKNICKERBOCKER: ~: ls -1 prefect_test prefect_test/proj*
prefect_test:
proj1
proj2

prefect_test/proj1:
WriteHello.py

prefect_test/proj2:
WriteHello.py
```
Just a folder with two subfolders, projects 1 and 2, each folder holds a file with nearly the same content.  Note the file paths are different and also the project names are different.

**proj1/WriteHello.py**
```
jaykae@DT-JKNICKERBOCKER: ~/prefect_test cat proj1/WriteHello.py
import prefect
from prefect import task, Flow

@task
def write_hello():
        with open("proj1/hello.txt","w") as hello_file:
                hello_file.write("Hello Project 1!!!")

with Flow("WriteHello") as flow:
        write_it = write_hello()

flow.register(project_name="Project1")
```

**proj2/WriteHello.py**
```
jaykae@DT-JKNICKERBOCKER: ~/prefect_test cat proj2/WriteHello.py
import prefect
from prefect import task, Flow

@task
def write_hello():
        with open("proj2/hello.txt","w") as hello_file:
                hello_file.write("Hello Project 2!!!")

with Flow("WriteHello") as flow:
        write_it = write_hello()

flow.register(project_name="Project2")
```

I register proj1/HelloWorld.py and then proj2/HelloWorld.py, I would expect that registering two flows with different file paths, as well as different project names would lead result in writing a text file in the directory for each flow when it is called.  However, when I run proj1/HelloWorld.py the file is written in the proj2 directory and says Hello Project 2!!!.

```
jaykae@DT-JKNICKERBOCKER: ~/prefect_test ls proj*
proj1:
WriteHello.py

proj2:
WriteHello.py
jaykae@DT-JKNICKERBOCKER: ~/prefect_test prefect run flow --name WriteHello --project Project1
Flow Run: http://localhost:8080/default/flow-run/e05b8f99-945d-4954-ab0d-7e5e89df0965
jaykae@DT-JKNICKERBOCKER: ~/prefect_test ls proj*
proj1:
WriteHello.py

proj2:
WriteHello.py  hello.txt
```

I tried changing the .py file name and that did not help at all, so I assume it has to do with the flow name.  Is there a way to have two flows with the same name, but different content, in separate projects and peacefully coexist?

--- 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/storage/local.py`
Content:
```
1 import os
2 import socket
3 from typing import TYPE_CHECKING, Any, Dict, List
4 
5 from slugify import slugify
6 
7 import prefect
8 from prefect.engine.results import LocalResult
9 from prefect.storage import Storage
10 from prefect.utilities.storage import extract_flow_from_file, extract_flow_from_module
11 
12 if TYPE_CHECKING:
13     from prefect.core.flow import Flow
14 
15 
16 class Local(Storage):
17     """
18     Local storage class.  This class represents the Storage
19     interface for Flows stored as bytes in the local filesystem.
20 
21     Note that if you register a Flow with Prefect Cloud using this storage,
22     your flow will automatically be labeled with your machine's hostname. This
23     ensures that only agents that are known to be running on the same
24     filesystem can run your flow.
25 
26     Args:
27         - directory (str, optional): the directory the flows will be stored in;
28             defaults to `~/.prefect/flows`.  If it doesn't already exist, it will be
29             created for you.
30         - validate (bool, optional): a boolean specifying whether to validate the
31             provided directory path; if `True`, the directory will be converted to an
32             absolute path and created.  Defaults to `True`
33         - path (str, optional): a direct path to the location of the flow file if
34             `stored_as_script=True`, otherwise this path will be used when storing the serialized,
35             pickled flow. If `stored_as_script=True`, the direct path may be a file path
36             (such as 'path/to/myflow.py') or a direct python path (such as 'myrepo.mymodule.myflow')
37         - stored_as_script (bool, optional): boolean for specifying if the flow has been stored
38             as a `.py` file. Defaults to `False`
39         - **kwargs (Any, optional): any additional `Storage` initialization options
40     """
41 
42     def __init__(
43         self,
44         directory: str = None,
45         validate: bool = True,
46         path: str = None,
47         stored_as_script: bool = False,
48         **kwargs: Any,
49     ) -> None:
50         directory = directory or os.path.join(prefect.config.home_dir, "flows")
51         self.flows = dict()  # type: Dict[str, str]
52         self._flows = dict()  # type: Dict[str, "prefect.core.flow.Flow"]
53 
54         self.path = path
55 
56         if validate:
57             abs_directory = os.path.abspath(os.path.expanduser(directory))
58             os.makedirs(abs_directory, exist_ok=True)
59         else:
60             abs_directory = directory
61 
62         self.directory = abs_directory
63         result = LocalResult(self.directory, validate_dir=validate)
64         super().__init__(result=result, stored_as_script=stored_as_script, **kwargs)
65 
66     @property
67     def default_labels(self) -> List[str]:
68         if self.add_default_labels:
69             return [socket.gethostname()]
70         else:
71             return []
72 
73     def get_flow(self, flow_location: str = None) -> "Flow":
74         """
75         Given a flow_location within this Storage object, returns the underlying Flow (if possible).
76 
77         Args:
78             - flow_location (str, optional): the location of a flow within this Storage; in this case,
79                 a file path or python path where a Flow has been serialized to. Will use `path`
80                 if not provided.
81 
82         Returns:
83             - Flow: the requested flow
84 
85         Raises:
86             - ValueError: if the flow is not contained in this storage
87         """
88         if flow_location:
89             if flow_location not in self.flows.values():
90                 raise ValueError("Flow is not contained in this Storage")
91         elif self.path:
92             flow_location = self.path
93         else:
94             raise ValueError("No flow location provided")
95 
96         # check if the path given is a file path
97         try:
98             if os.path.isfile(flow_location):
99                 if self.stored_as_script:
100                     return extract_flow_from_file(file_path=flow_location)
101                 else:
102                     return prefect.core.flow.Flow.load(flow_location)
103             # otherwise the path is given in the module format
104             else:
105                 return extract_flow_from_module(module_str=flow_location)
106         except Exception:
107             self.logger.exception(f"Failed to load Flow from {flow_location}")
108             raise
109 
110     def add_flow(self, flow: "Flow") -> str:
111         """
112         Method for storing a new flow as bytes in the local filesytem.
113 
114         Args:
115             - flow (Flow): a Prefect Flow to add
116 
117         Returns:
118             - str: the location of the newly added flow in this Storage object
119 
120         Raises:
121             - ValueError: if a flow with the same name is already contained in this storage
122         """
123         if flow.name in self:
124             raise ValueError(
125                 'Name conflict: Flow with the name "{}" is already present in this storage.'.format(
126                     flow.name
127                 )
128             )
129 
130         if self.stored_as_script:
131             if not self.path:
132                 raise ValueError(
133                     "A `path` must be provided to show where flow `.py` file is stored."
134                 )
135             flow_location = self.path
136         else:
137             if self.path:
138                 flow_location = self.path
139             else:
140                 flow_location = os.path.join(
141                     self.directory, "{}.prefect".format(slugify(flow.name))
142                 )
143             flow_location = flow.save(flow_location)
144 
145         self.flows[flow.name] = flow_location
146         self._flows[flow.name] = flow
147         return flow_location
148 
149     def __contains__(self, obj: Any) -> bool:
150         """
151         Method for determining whether an object is contained within this storage.
152         """
153         if not isinstance(obj, str):
154             return False
155         return obj in self.flows
156 
157     def build(self) -> "Storage":
158         """
159         Build the Storage object.
160 
161         Returns:
162             - Storage: a Storage object that contains information about how and where
163                 each flow is stored
164         """
165         self.run_basic_healthchecks()
166         return self
167
```
--- 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/storage/local.py b/src/prefect/storage/local.py
--- a/src/prefect/storage/local.py
+++ b/src/prefect/storage/local.py
@@ -2,6 +2,8 @@
 import socket
 from typing import TYPE_CHECKING, Any, Dict, List
 
+import cloudpickle
+import pendulum
 from slugify import slugify
 
 import prefect
@@ -99,7 +101,8 @@
                 if self.stored_as_script:
                     return extract_flow_from_file(file_path=flow_location)
                 else:
-                    return prefect.core.flow.Flow.load(flow_location)
+                    with open(flow_location, "rb") as f:
+                        return cloudpickle.load(f)
             # otherwise the path is given in the module format
             else:
                 return extract_flow_from_module(module_str=flow_location)
@@ -138,9 +141,13 @@
                 flow_location = self.path
             else:
                 flow_location = os.path.join(
-                    self.directory, "{}.prefect".format(slugify(flow.name))
+                    self.directory,
+                    slugify(flow.name),
+                    slugify(pendulum.now("utc").isoformat()),
                 )
-            flow_location = flow.save(flow_location)
+            os.makedirs(os.path.dirname(flow_location), exist_ok=True)
+            with open(flow_location, "wb") as f:
+                cloudpickle.dump(flow, f)
 
         self.flows[flow.name] = flow_location
         self._flows[flow.name] = flow

{"golden_diff": "diff --git a/src/prefect/storage/local.py b/src/prefect/storage/local.py\n--- a/src/prefect/storage/local.py\n+++ b/src/prefect/storage/local.py\n@@ -2,6 +2,8 @@\n import socket\n from typing import TYPE_CHECKING, Any, Dict, List\n \n+import cloudpickle\n+import pendulum\n from slugify import slugify\n \n import prefect\n@@ -99,7 +101,8 @@\n                 if self.stored_as_script:\n                     return extract_flow_from_file(file_path=flow_location)\n                 else:\n-                    return prefect.core.flow.Flow.load(flow_location)\n+                    with open(flow_location, \"rb\") as f:\n+                        return cloudpickle.load(f)\n             # otherwise the path is given in the module format\n             else:\n                 return extract_flow_from_module(module_str=flow_location)\n@@ -138,9 +141,13 @@\n                 flow_location = self.path\n             else:\n                 flow_location = os.path.join(\n-                    self.directory, \"{}.prefect\".format(slugify(flow.name))\n+                    self.directory,\n+                    slugify(flow.name),\n+                    slugify(pendulum.now(\"utc\").isoformat()),\n                 )\n-            flow_location = flow.save(flow_location)\n+            os.makedirs(os.path.dirname(flow_location), exist_ok=True)\n+            with open(flow_location, \"wb\") as f:\n+                cloudpickle.dump(flow, f)\n \n         self.flows[flow.name] = flow_location\n         self._flows[flow.name] = flow\n", "issue": "Prefect serializes flows based on flow name ignoring project\nHi,\r\n\r\nI searched the slack channel and did not find anything that pertained directly to this.  We use Prefect for two departments that have virtually the same flows, but different sources and different processing rules.  What we have found is that flows with the same name overwrite each other regardless of the project.  I am not sure if that is intended or if there is a way to work around this issue.\r\n\r\nThis is a minimal example that I confirmed in a fresh install of Prefect 0.14.0 running the server backend in docker with a local agent all on the same machine.\r\n\r\n```\r\njaykae@DT-JKNICKERBOCKER: ~: ls -1 prefect_test prefect_test/proj*\r\nprefect_test:\r\nproj1\r\nproj2\r\n\r\nprefect_test/proj1:\r\nWriteHello.py\r\n\r\nprefect_test/proj2:\r\nWriteHello.py\r\n```\r\nJust a folder with two subfolders, projects 1 and 2, each folder holds a file with nearly the same content.  Note the file paths are different and also the project names are different.\r\n\r\n**proj1/WriteHello.py**\r\n```\r\njaykae@DT-JKNICKERBOCKER: ~/prefect_test cat proj1/WriteHello.py\r\nimport prefect\r\nfrom prefect import task, Flow\r\n\r\n@task\r\ndef write_hello():\r\n        with open(\"proj1/hello.txt\",\"w\") as hello_file:\r\n                hello_file.write(\"Hello Project 1!!!\")\r\n\r\nwith Flow(\"WriteHello\") as flow:\r\n        write_it = write_hello()\r\n\r\nflow.register(project_name=\"Project1\")\r\n```\r\n\r\n**proj2/WriteHello.py**\r\n```\r\njaykae@DT-JKNICKERBOCKER: ~/prefect_test cat proj2/WriteHello.py\r\nimport prefect\r\nfrom prefect import task, Flow\r\n\r\n@task\r\ndef write_hello():\r\n        with open(\"proj2/hello.txt\",\"w\") as hello_file:\r\n                hello_file.write(\"Hello Project 2!!!\")\r\n\r\nwith Flow(\"WriteHello\") as flow:\r\n        write_it = write_hello()\r\n\r\nflow.register(project_name=\"Project2\")\r\n```\r\n\r\nI register proj1/HelloWorld.py and then proj2/HelloWorld.py, I would expect that registering two flows with different file paths, as well as different project names would lead result in writing a text file in the directory for each flow when it is called.  However, when I run proj1/HelloWorld.py the file is written in the proj2 directory and says Hello Project 2!!!.\r\n\r\n```\r\njaykae@DT-JKNICKERBOCKER: ~/prefect_test ls proj*\r\nproj1:\r\nWriteHello.py\r\n\r\nproj2:\r\nWriteHello.py\r\njaykae@DT-JKNICKERBOCKER: ~/prefect_test prefect run flow --name WriteHello --project Project1\r\nFlow Run: http://localhost:8080/default/flow-run/e05b8f99-945d-4954-ab0d-7e5e89df0965\r\njaykae@DT-JKNICKERBOCKER: ~/prefect_test ls proj*\r\nproj1:\r\nWriteHello.py\r\n\r\nproj2:\r\nWriteHello.py  hello.txt\r\n```\r\n\r\nI tried changing the .py file name and that did not help at all, so I assume it has to do with the flow name.  Is there a way to have two flows with the same name, but different content, in separate projects and peacefully coexist?\n", "before_files": [{"content": "import os\nimport socket\nfrom typing import TYPE_CHECKING, Any, Dict, List\n\nfrom slugify import slugify\n\nimport prefect\nfrom prefect.engine.results import LocalResult\nfrom prefect.storage import Storage\nfrom prefect.utilities.storage import extract_flow_from_file, extract_flow_from_module\n\nif TYPE_CHECKING:\n    from prefect.core.flow import Flow\n\n\nclass Local(Storage):\n    \"\"\"\n    Local storage class.  This class represents the Storage\n    interface for Flows stored as bytes in the local filesystem.\n\n    Note that if you register a Flow with Prefect Cloud using this storage,\n    your flow will automatically be labeled with your machine's hostname. This\n    ensures that only agents that are known to be running on the same\n    filesystem can run your flow.\n\n    Args:\n        - directory (str, optional): the directory the flows will be stored in;\n            defaults to `~/.prefect/flows`.  If it doesn't already exist, it will be\n            created for you.\n        - validate (bool, optional): a boolean specifying whether to validate the\n            provided directory path; if `True`, the directory will be converted to an\n            absolute path and created.  Defaults to `True`\n        - path (str, optional): a direct path to the location of the flow file if\n            `stored_as_script=True`, otherwise this path will be used when storing the serialized,\n            pickled flow. If `stored_as_script=True`, the direct path may be a file path\n            (such as 'path/to/myflow.py') or a direct python path (such as 'myrepo.mymodule.myflow')\n        - stored_as_script (bool, optional): boolean for specifying if the flow has been stored\n            as a `.py` file. Defaults to `False`\n        - **kwargs (Any, optional): any additional `Storage` initialization options\n    \"\"\"\n\n    def __init__(\n        self,\n        directory: str = None,\n        validate: bool = True,\n        path: str = None,\n        stored_as_script: bool = False,\n        **kwargs: Any,\n    ) -> None:\n        directory = directory or os.path.join(prefect.config.home_dir, \"flows\")\n        self.flows = dict()  # type: Dict[str, str]\n        self._flows = dict()  # type: Dict[str, \"prefect.core.flow.Flow\"]\n\n        self.path = path\n\n        if validate:\n            abs_directory = os.path.abspath(os.path.expanduser(directory))\n            os.makedirs(abs_directory, exist_ok=True)\n        else:\n            abs_directory = directory\n\n        self.directory = abs_directory\n        result = LocalResult(self.directory, validate_dir=validate)\n        super().__init__(result=result, stored_as_script=stored_as_script, **kwargs)\n\n    @property\n    def default_labels(self) -> List[str]:\n        if self.add_default_labels:\n            return [socket.gethostname()]\n        else:\n            return []\n\n    def get_flow(self, flow_location: str = None) -> \"Flow\":\n        \"\"\"\n        Given a flow_location within this Storage object, returns the underlying Flow (if possible).\n\n        Args:\n            - flow_location (str, optional): the location of a flow within this Storage; in this case,\n                a file path or python path where a Flow has been serialized to. Will use `path`\n                if not provided.\n\n        Returns:\n            - Flow: the requested flow\n\n        Raises:\n            - ValueError: if the flow is not contained in this storage\n        \"\"\"\n        if flow_location:\n            if flow_location not in self.flows.values():\n                raise ValueError(\"Flow is not contained in this Storage\")\n        elif self.path:\n            flow_location = self.path\n        else:\n            raise ValueError(\"No flow location provided\")\n\n        # check if the path given is a file path\n        try:\n            if os.path.isfile(flow_location):\n                if self.stored_as_script:\n                    return extract_flow_from_file(file_path=flow_location)\n                else:\n                    return prefect.core.flow.Flow.load(flow_location)\n            # otherwise the path is given in the module format\n            else:\n                return extract_flow_from_module(module_str=flow_location)\n        except Exception:\n            self.logger.exception(f\"Failed to load Flow from {flow_location}\")\n            raise\n\n    def add_flow(self, flow: \"Flow\") -> str:\n        \"\"\"\n        Method for storing a new flow as bytes in the local filesytem.\n\n        Args:\n            - flow (Flow): a Prefect Flow to add\n\n        Returns:\n            - str: the location of the newly added flow in this Storage object\n\n        Raises:\n            - ValueError: if a flow with the same name is already contained in this storage\n        \"\"\"\n        if flow.name in self:\n            raise ValueError(\n                'Name conflict: Flow with the name \"{}\" is already present in this storage.'.format(\n                    flow.name\n                )\n            )\n\n        if self.stored_as_script:\n            if not self.path:\n                raise ValueError(\n                    \"A `path` must be provided to show where flow `.py` file is stored.\"\n                )\n            flow_location = self.path\n        else:\n            if self.path:\n                flow_location = self.path\n            else:\n                flow_location = os.path.join(\n                    self.directory, \"{}.prefect\".format(slugify(flow.name))\n                )\n            flow_location = flow.save(flow_location)\n\n        self.flows[flow.name] = flow_location\n        self._flows[flow.name] = flow\n        return flow_location\n\n    def __contains__(self, obj: Any) -> bool:\n        \"\"\"\n        Method for determining whether an object is contained within this storage.\n        \"\"\"\n        if not isinstance(obj, str):\n            return False\n        return obj in self.flows\n\n    def build(self) -> \"Storage\":\n        \"\"\"\n        Build the Storage object.\n\n        Returns:\n            - Storage: a Storage object that contains information about how and where\n                each flow is stored\n        \"\"\"\n        self.run_basic_healthchecks()\n        return self\n", "path": "src/prefect/storage/local.py"}], "after_files": [{"content": "import os\nimport socket\nfrom typing import TYPE_CHECKING, Any, Dict, List\n\nimport cloudpickle\nimport pendulum\nfrom slugify import slugify\n\nimport prefect\nfrom prefect.engine.results import LocalResult\nfrom prefect.storage import Storage\nfrom prefect.utilities.storage import extract_flow_from_file, extract_flow_from_module\n\nif TYPE_CHECKING:\n    from prefect.core.flow import Flow\n\n\nclass Local(Storage):\n    \"\"\"\n    Local storage class.  This class represents the Storage\n    interface for Flows stored as bytes in the local filesystem.\n\n    Note that if you register a Flow with Prefect Cloud using this storage,\n    your flow will automatically be labeled with your machine's hostname. This\n    ensures that only agents that are known to be running on the same\n    filesystem can run your flow.\n\n    Args:\n        - directory (str, optional): the directory the flows will be stored in;\n            defaults to `~/.prefect/flows`.  If it doesn't already exist, it will be\n            created for you.\n        - validate (bool, optional): a boolean specifying whether to validate the\n            provided directory path; if `True`, the directory will be converted to an\n            absolute path and created.  Defaults to `True`\n        - path (str, optional): a direct path to the location of the flow file if\n            `stored_as_script=True`, otherwise this path will be used when storing the serialized,\n            pickled flow. If `stored_as_script=True`, the direct path may be a file path\n            (such as 'path/to/myflow.py') or a direct python path (such as 'myrepo.mymodule.myflow')\n        - stored_as_script (bool, optional): boolean for specifying if the flow has been stored\n            as a `.py` file. Defaults to `False`\n        - **kwargs (Any, optional): any additional `Storage` initialization options\n    \"\"\"\n\n    def __init__(\n        self,\n        directory: str = None,\n        validate: bool = True,\n        path: str = None,\n        stored_as_script: bool = False,\n        **kwargs: Any,\n    ) -> None:\n        directory = directory or os.path.join(prefect.config.home_dir, \"flows\")\n        self.flows = dict()  # type: Dict[str, str]\n        self._flows = dict()  # type: Dict[str, \"prefect.core.flow.Flow\"]\n\n        self.path = path\n\n        if validate:\n            abs_directory = os.path.abspath(os.path.expanduser(directory))\n            os.makedirs(abs_directory, exist_ok=True)\n        else:\n            abs_directory = directory\n\n        self.directory = abs_directory\n        result = LocalResult(self.directory, validate_dir=validate)\n        super().__init__(result=result, stored_as_script=stored_as_script, **kwargs)\n\n    @property\n    def default_labels(self) -> List[str]:\n        if self.add_default_labels:\n            return [socket.gethostname()]\n        else:\n            return []\n\n    def get_flow(self, flow_location: str = None) -> \"Flow\":\n        \"\"\"\n        Given a flow_location within this Storage object, returns the underlying Flow (if possible).\n\n        Args:\n            - flow_location (str, optional): the location of a flow within this Storage; in this case,\n                a file path or python path where a Flow has been serialized to. Will use `path`\n                if not provided.\n\n        Returns:\n            - Flow: the requested flow\n\n        Raises:\n            - ValueError: if the flow is not contained in this storage\n        \"\"\"\n        if flow_location:\n            if flow_location not in self.flows.values():\n                raise ValueError(\"Flow is not contained in this Storage\")\n        elif self.path:\n            flow_location = self.path\n        else:\n            raise ValueError(\"No flow location provided\")\n\n        # check if the path given is a file path\n        try:\n            if os.path.isfile(flow_location):\n                if self.stored_as_script:\n                    return extract_flow_from_file(file_path=flow_location)\n                else:\n                    with open(flow_location, \"rb\") as f:\n                        return cloudpickle.load(f)\n            # otherwise the path is given in the module format\n            else:\n                return extract_flow_from_module(module_str=flow_location)\n        except Exception:\n            self.logger.exception(f\"Failed to load Flow from {flow_location}\")\n            raise\n\n    def add_flow(self, flow: \"Flow\") -> str:\n        \"\"\"\n        Method for storing a new flow as bytes in the local filesytem.\n\n        Args:\n            - flow (Flow): a Prefect Flow to add\n\n        Returns:\n            - str: the location of the newly added flow in this Storage object\n\n        Raises:\n            - ValueError: if a flow with the same name is already contained in this storage\n        \"\"\"\n        if flow.name in self:\n            raise ValueError(\n                'Name conflict: Flow with the name \"{}\" is already present in this storage.'.format(\n                    flow.name\n                )\n            )\n\n        if self.stored_as_script:\n            if not self.path:\n                raise ValueError(\n                    \"A `path` must be provided to show where flow `.py` file is stored.\"\n                )\n            flow_location = self.path\n        else:\n            if self.path:\n                flow_location = self.path\n            else:\n                flow_location = os.path.join(\n                    self.directory,\n                    slugify(flow.name),\n                    slugify(pendulum.now(\"utc\").isoformat()),\n                )\n            os.makedirs(os.path.dirname(flow_location), exist_ok=True)\n            with open(flow_location, \"wb\") as f:\n                cloudpickle.dump(flow, f)\n\n        self.flows[flow.name] = flow_location\n        self._flows[flow.name] = flow\n        return flow_location\n\n    def __contains__(self, obj: Any) -> bool:\n        \"\"\"\n        Method for determining whether an object is contained within this storage.\n        \"\"\"\n        if not isinstance(obj, str):\n            return False\n        return obj in self.flows\n\n    def build(self) -> \"Storage\":\n        \"\"\"\n        Build the Storage object.\n\n        Returns:\n            - Storage: a Storage object that contains information about how and where\n                each flow is stored\n        \"\"\"\n        self.run_basic_healthchecks()\n        return self\n", "path": "src/prefect/storage/local.py"}]}