We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Think of a way to keep development accounts separately 
## Abstract

Between multiple development machines and between `production`/`develop` it becomes harder to keep track of which database has been used by which branch. This can lead to partially updated databases being used.

As a proposal, we could somehow separate where the `develop` accounts and the production accounts are stored so that they are not sharing the same place.

We can always copy accounts from production to develop manually (this can go to the guide).

We should also consider how this affects nightlies and how nightlies are treated. For example we might want to treat nightlies as development to avoid having users mess accidentally with their production accounts.  

## Motivation

Helps better track which accounts are used in `develop`/`production`.

## Specification

- TDB


--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `rotkehlchen/config.py`
Content:
```
1 import logging
2 import os
3 import platform
4 import shutil
5 from pathlib import Path
6 
7 from rotkehlchen.logging import RotkehlchenLogsAdapter
8 
9 logger = logging.getLogger(__name__)
10 log = RotkehlchenLogsAdapter(logger)
11 
12 
13 def get_xdg_data_home() -> Path:
14     directory = os.environ.get('XDG_DATA_HOME', None)
15     if directory is None:
16         home = os.path.expanduser("~")
17         directory = os.path.join(home, '.local', 'share')
18 
19     return Path(directory)
20 
21 
22 def get_win32_appdata() -> Path:
23     directory = os.environ.get('LOCALAPPDATA', None)
24     if not directory:
25         # In windows XP there is no localappdata
26         directory = os.environ.get('APPDATA', None)
27         if not directory:
28             raise AssertionError('Could not detect an APPDATA directory')
29 
30     return Path(directory)
31 
32 
33 def old_data_directory() -> Path:
34     home = os.path.expanduser("~")
35     directory = os.path.join(home, '.rotkehlchen')
36     return Path(directory)
37 
38 
39 def default_data_directory() -> Path:
40     """Find the default data directory for rotki for each different OS
41 
42     An interesting lirary that finds the data directories per OS is this:
43     https://github.com/ActiveState/appdirs/blob/master/appdirs.py
44     """
45     if platform.system() == 'Linux':
46         xdgconfig = get_xdg_data_home()
47         datadir = xdgconfig / 'rotki' / 'data'
48     elif platform.system() == 'Windows':
49         appdata = get_win32_appdata()
50         datadir = appdata / 'rotki' / 'data'
51     elif platform.system() == 'Darwin':
52         datadir = Path(os.path.expanduser('~/Library/Application Support/rotki/data'))
53     else:
54         raise AssertionError(f'rotki running in unknown system: {platform.system()}')
55 
56     # If old data directory exists and new does not exist copy stuff
57     old_dir = old_data_directory()
58     if old_dir.exists() and not datadir.exists():
59         log.info(f'First time using standard data directory. Copying from {old_dir} to {datadir}')
60         shutil.copytree(old_dir, datadir)
61 
62     datadir.mkdir(parents=True, exist_ok=True)
63     return datadir
64
```
--- 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/rotkehlchen/config.py b/rotkehlchen/config.py
--- a/rotkehlchen/config.py
+++ b/rotkehlchen/config.py
@@ -2,6 +2,7 @@
 import os
 import platform
 import shutil
+import sys
 from pathlib import Path
 
 from rotkehlchen.logging import RotkehlchenLogsAdapter
@@ -42,14 +43,18 @@
     An interesting lirary that finds the data directories per OS is this:
     https://github.com/ActiveState/appdirs/blob/master/appdirs.py
     """
+    data_dir_name = 'data'
+    if getattr(sys, 'frozen', False) is False:
+        data_dir_name = 'develop_data'
+
     if platform.system() == 'Linux':
         xdgconfig = get_xdg_data_home()
-        datadir = xdgconfig / 'rotki' / 'data'
+        datadir = xdgconfig / 'rotki' / data_dir_name
     elif platform.system() == 'Windows':
         appdata = get_win32_appdata()
-        datadir = appdata / 'rotki' / 'data'
+        datadir = appdata / 'rotki' / data_dir_name
     elif platform.system() == 'Darwin':
-        datadir = Path(os.path.expanduser('~/Library/Application Support/rotki/data'))
+        datadir = Path(os.path.expanduser(f'~/Library/Application Support/rotki/{data_dir_name}'))  # noqa: E501
     else:
         raise AssertionError(f'rotki running in unknown system: {platform.system()}')

{"golden_diff": "diff --git a/rotkehlchen/config.py b/rotkehlchen/config.py\n--- a/rotkehlchen/config.py\n+++ b/rotkehlchen/config.py\n@@ -2,6 +2,7 @@\n import os\n import platform\n import shutil\n+import sys\n from pathlib import Path\n \n from rotkehlchen.logging import RotkehlchenLogsAdapter\n@@ -42,14 +43,18 @@\n     An interesting lirary that finds the data directories per OS is this:\n     https://github.com/ActiveState/appdirs/blob/master/appdirs.py\n     \"\"\"\n+    data_dir_name = 'data'\n+    if getattr(sys, 'frozen', False) is False:\n+        data_dir_name = 'develop_data'\n+\n     if platform.system() == 'Linux':\n         xdgconfig = get_xdg_data_home()\n-        datadir = xdgconfig / 'rotki' / 'data'\n+        datadir = xdgconfig / 'rotki' / data_dir_name\n     elif platform.system() == 'Windows':\n         appdata = get_win32_appdata()\n-        datadir = appdata / 'rotki' / 'data'\n+        datadir = appdata / 'rotki' / data_dir_name\n     elif platform.system() == 'Darwin':\n-        datadir = Path(os.path.expanduser('~/Library/Application Support/rotki/data'))\n+        datadir = Path(os.path.expanduser(f'~/Library/Application Support/rotki/{data_dir_name}'))  # noqa: E501\n     else:\n         raise AssertionError(f'rotki running in unknown system: {platform.system()}')\n", "issue": "Think of a way to keep development accounts separately \n## Abstract\r\n\r\nBetween multiple development machines and between `production`/`develop` it becomes harder to keep track of which database has been used by which branch. This can lead to partially updated databases being used.\r\n\r\nAs a proposal, we could somehow separate where the `develop` accounts and the production accounts are stored so that they are not sharing the same place.\r\n\r\nWe can always copy accounts from production to develop manually (this can go to the guide).\r\n\r\nWe should also consider how this affects nightlies and how nightlies are treated. For example we might want to treat nightlies as development to avoid having users mess accidentally with their production accounts.  \r\n\r\n## Motivation\r\n\r\nHelps better track which accounts are used in `develop`/`production`.\r\n\r\n## Specification\r\n\r\n- TDB\r\n\n", "before_files": [{"content": "import logging\nimport os\nimport platform\nimport shutil\nfrom pathlib import Path\n\nfrom rotkehlchen.logging import RotkehlchenLogsAdapter\n\nlogger = logging.getLogger(__name__)\nlog = RotkehlchenLogsAdapter(logger)\n\n\ndef get_xdg_data_home() -> Path:\n    directory = os.environ.get('XDG_DATA_HOME', None)\n    if directory is None:\n        home = os.path.expanduser(\"~\")\n        directory = os.path.join(home, '.local', 'share')\n\n    return Path(directory)\n\n\ndef get_win32_appdata() -> Path:\n    directory = os.environ.get('LOCALAPPDATA', None)\n    if not directory:\n        # In windows XP there is no localappdata\n        directory = os.environ.get('APPDATA', None)\n        if not directory:\n            raise AssertionError('Could not detect an APPDATA directory')\n\n    return Path(directory)\n\n\ndef old_data_directory() -> Path:\n    home = os.path.expanduser(\"~\")\n    directory = os.path.join(home, '.rotkehlchen')\n    return Path(directory)\n\n\ndef default_data_directory() -> Path:\n    \"\"\"Find the default data directory for rotki for each different OS\n\n    An interesting lirary that finds the data directories per OS is this:\n    https://github.com/ActiveState/appdirs/blob/master/appdirs.py\n    \"\"\"\n    if platform.system() == 'Linux':\n        xdgconfig = get_xdg_data_home()\n        datadir = xdgconfig / 'rotki' / 'data'\n    elif platform.system() == 'Windows':\n        appdata = get_win32_appdata()\n        datadir = appdata / 'rotki' / 'data'\n    elif platform.system() == 'Darwin':\n        datadir = Path(os.path.expanduser('~/Library/Application Support/rotki/data'))\n    else:\n        raise AssertionError(f'rotki running in unknown system: {platform.system()}')\n\n    # If old data directory exists and new does not exist copy stuff\n    old_dir = old_data_directory()\n    if old_dir.exists() and not datadir.exists():\n        log.info(f'First time using standard data directory. Copying from {old_dir} to {datadir}')\n        shutil.copytree(old_dir, datadir)\n\n    datadir.mkdir(parents=True, exist_ok=True)\n    return datadir\n", "path": "rotkehlchen/config.py"}], "after_files": [{"content": "import logging\nimport os\nimport platform\nimport shutil\nimport sys\nfrom pathlib import Path\n\nfrom rotkehlchen.logging import RotkehlchenLogsAdapter\n\nlogger = logging.getLogger(__name__)\nlog = RotkehlchenLogsAdapter(logger)\n\n\ndef get_xdg_data_home() -> Path:\n    directory = os.environ.get('XDG_DATA_HOME', None)\n    if directory is None:\n        home = os.path.expanduser(\"~\")\n        directory = os.path.join(home, '.local', 'share')\n\n    return Path(directory)\n\n\ndef get_win32_appdata() -> Path:\n    directory = os.environ.get('LOCALAPPDATA', None)\n    if not directory:\n        # In windows XP there is no localappdata\n        directory = os.environ.get('APPDATA', None)\n        if not directory:\n            raise AssertionError('Could not detect an APPDATA directory')\n\n    return Path(directory)\n\n\ndef old_data_directory() -> Path:\n    home = os.path.expanduser(\"~\")\n    directory = os.path.join(home, '.rotkehlchen')\n    return Path(directory)\n\n\ndef default_data_directory() -> Path:\n    \"\"\"Find the default data directory for rotki for each different OS\n\n    An interesting lirary that finds the data directories per OS is this:\n    https://github.com/ActiveState/appdirs/blob/master/appdirs.py\n    \"\"\"\n    data_dir_name = 'data'\n    if getattr(sys, 'frozen', False) is False:\n        data_dir_name = 'develop_data'\n\n    if platform.system() == 'Linux':\n        xdgconfig = get_xdg_data_home()\n        datadir = xdgconfig / 'rotki' / data_dir_name\n    elif platform.system() == 'Windows':\n        appdata = get_win32_appdata()\n        datadir = appdata / 'rotki' / data_dir_name\n    elif platform.system() == 'Darwin':\n        datadir = Path(os.path.expanduser(f'~/Library/Application Support/rotki/{data_dir_name}'))  # noqa: E501\n    else:\n        raise AssertionError(f'rotki running in unknown system: {platform.system()}')\n\n    # If old data directory exists and new does not exist copy stuff\n    old_dir = old_data_directory()\n    if old_dir.exists() and not datadir.exists():\n        log.info(f'First time using standard data directory. Copying from {old_dir} to {datadir}')\n        shutil.copytree(old_dir, datadir)\n\n    datadir.mkdir(parents=True, exist_ok=True)\n    return datadir\n", "path": "rotkehlchen/config.py"}]}