We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
`NameError: name 'logg' is not defined` when using `sc.queries.mitochondrial_genes`
I just tried
```python
import scanpy.api as sc
sc.queries.mitochondrial_genes('www.ensembl.org', 'strange_organism')
```
I would expect scanpy complains that it does not know `'strange_organism'`, but I get the error 
```python
---------------------------------------------------------------------------
NameError                                 Traceback (most recent call last)
<ipython-input-13-6a41b361ab41> in <module>()
      1 import scanpy.api as sc
----> 2 sc.queries.mitochondrial_genes('www.ensembl.org', 'drerio')

~/software/scanpy/scanpy/queries/__init__.py in mitochondrial_genes(host, org)
     34         s.add_attribute_to_xml('mgi_symbol')
     35     else:
---> 36         logg.msg('organism ', str(org), ' is unavailable', v=4, no_indent=True)
     37         return None
     38     s.add_attribute_to_xml('chromosome_name')

NameError: name 'logg' is not defined
```
It seems to me like `queries/__init__.py` misses an `from .. import logging as logg` statement.

Would maybe also make sense to show the the message that an organism is not available at verbosity level 1 instead of 4?

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `scanpy/queries/__init__.py`
Content:
```
1 import pandas as pd
2 
3 
4 def mitochondrial_genes(host, org):
5     """Mitochondrial gene symbols for specific organism through BioMart.
6 
7     Parameters
8     ----------
9     host : {{'www.ensembl.org', ...}}
10         A valid BioMart host URL.
11     org : {{'hsapiens', 'mmusculus'}}
12         Organism to query. Currently available are human ('hsapiens') and mouse
13         ('mmusculus').
14 
15     Returns
16     -------
17     A `pd.Index` containing mitochondrial gene symbols.
18     """
19     try:
20         from bioservices import biomart
21     except ImportError:
22         raise ImportError(
23             'You need to install the `bioservices` module.')
24     from io import StringIO
25     s = biomart.BioMart(host=host)
26 
27     # building query
28     s.new_query()
29     if org == 'hsapiens':
30         s.add_dataset_to_xml('hsapiens_gene_ensembl')
31         s.add_attribute_to_xml('hgnc_symbol')
32     elif org == 'mmusculus':
33         s.add_dataset_to_xml('mmusculus_gene_ensembl')
34         s.add_attribute_to_xml('mgi_symbol')
35     else:
36         logg.msg('organism ', str(org), ' is unavailable', v=4, no_indent=True)
37         return None
38     s.add_attribute_to_xml('chromosome_name')
39     xml = s.get_xml()
40 
41     # parsing mitochondrial gene symbols
42     res = pd.read_csv(StringIO(s.query(xml)), sep='\t', header=None)
43     res.columns = ['symbol', 'chromosome_name']
44     res = res.dropna()
45     res = res[res['chromosome_name'] == 'MT']
46     res = res.set_index('symbol')
47     res = res[~res.index.duplicated(keep='first')]
48 
49     return res.index
50 
51 
52 def gene_coordinates(host, org, gene, chr_exclude=[]):
53     """Retrieve gene coordinates for specific organism through BioMart.
54     Parameters
55     ----------
56     host : {{'www.ensembl.org', ...}}
57         A valid BioMart host URL. Can be used to control genome build.
58     org : {{'hsapiens', 'mmusculus'}}
59         Organism to query. Currently available are human ('hsapiens') and mouse
60         ('mmusculus').
61     gene :
62         The gene symbol (e.g. 'hgnc_symbol' for human) for which to retrieve
63         coordinates.
64     chr_exclude :
65         A list of chromosomes to exclude from query.
66     Returns
67     -------
68     A `pd.DataFrame` containing gene coordinates for the specified gene symbol.
69     """
70     try:
71         from bioservices import biomart
72     except ImportError:
73         raise ImportError(
74             'You need to install the `bioservices` module.')
75     from io import StringIO
76     s = biomart.BioMart(host=host)
77 
78     # building query
79     s.new_query()
80     if org == 'hsapiens':
81         s.add_dataset_to_xml('hsapiens_gene_ensembl')
82         s.add_attribute_to_xml('hgnc_symbol')
83     elif org == 'mmusculus':
84         s.add_dataset_to_xml('mmusculus_gene_ensembl')
85         s.add_attribute_to_xml('mgi_symbol')
86     else:
87         logg.msg('organism ', str(org), ' is unavailable', v=4, no_indent=True)
88         return None
89     s.add_attribute_to_xml('chromosome_name')
90     s.add_attribute_to_xml('start_position')
91     s.add_attribute_to_xml('end_position')
92     xml = s.get_xml()
93 
94     # parsing gene coordinates
95     res = pd.read_csv(StringIO(s.query(xml)), sep='\t', header=None)
96     res.columns = ['symbol', 'chromosome_name', 'start', 'end']
97     res = res.dropna()
98     res = res[~res['chromosome_name'].isin(chr_exclude)]
99     res = res.set_index('symbol')
100 
101     return res.loc[[gene], :]
102
```
--- 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/scanpy/queries/__init__.py b/scanpy/queries/__init__.py
--- a/scanpy/queries/__init__.py
+++ b/scanpy/queries/__init__.py
@@ -1,4 +1,5 @@
 import pandas as pd
+from .. import logging as logg
 
 
 def mitochondrial_genes(host, org):
@@ -8,9 +9,9 @@
     ----------
     host : {{'www.ensembl.org', ...}}
         A valid BioMart host URL.
-    org : {{'hsapiens', 'mmusculus'}}
-        Organism to query. Currently available are human ('hsapiens') and mouse
-        ('mmusculus').
+    org : {{'hsapiens', 'mmusculus', 'drerio'}}
+        Organism to query. Currently available are human ('hsapiens'), mouse
+        ('mmusculus') and zebrafish ('drerio').
 
     Returns
     -------
@@ -32,6 +33,9 @@
     elif org == 'mmusculus':
         s.add_dataset_to_xml('mmusculus_gene_ensembl')
         s.add_attribute_to_xml('mgi_symbol')
+    elif org == 'drerio':
+        s.add_dataset_to_xml('drerio_gene_ensembl')
+        s.add_attribute_to_xml('zfin_id_symbol')
     else:
         logg.msg('organism ', str(org), ' is unavailable', v=4, no_indent=True)
         return None
@@ -55,9 +59,9 @@
     ----------
     host : {{'www.ensembl.org', ...}}
         A valid BioMart host URL. Can be used to control genome build.
-    org : {{'hsapiens', 'mmusculus'}}
-        Organism to query. Currently available are human ('hsapiens') and mouse
-        ('mmusculus').
+    org : {{'hsapiens', 'mmusculus', 'drerio'}}
+        Organism to query. Currently available are human ('hsapiens'), mouse
+        ('mmusculus') and zebrafish ('drerio').
     gene :
         The gene symbol (e.g. 'hgnc_symbol' for human) for which to retrieve
         coordinates.
@@ -83,6 +87,9 @@
     elif org == 'mmusculus':
         s.add_dataset_to_xml('mmusculus_gene_ensembl')
         s.add_attribute_to_xml('mgi_symbol')
+    elif org == 'drerio':
+        s.add_dataset_to_xml('drerio_gene_ensembl')
+        s.add_attribute_to_xml('zfin_id_symbol')
     else:
         logg.msg('organism ', str(org), ' is unavailable', v=4, no_indent=True)
         return None

{"golden_diff": "diff --git a/scanpy/queries/__init__.py b/scanpy/queries/__init__.py\n--- a/scanpy/queries/__init__.py\n+++ b/scanpy/queries/__init__.py\n@@ -1,4 +1,5 @@\n import pandas as pd\n+from .. import logging as logg\n \n \n def mitochondrial_genes(host, org):\n@@ -8,9 +9,9 @@\n     ----------\n     host : {{'www.ensembl.org', ...}}\n         A valid BioMart host URL.\n-    org : {{'hsapiens', 'mmusculus'}}\n-        Organism to query. Currently available are human ('hsapiens') and mouse\n-        ('mmusculus').\n+    org : {{'hsapiens', 'mmusculus', 'drerio'}}\n+        Organism to query. Currently available are human ('hsapiens'), mouse\n+        ('mmusculus') and zebrafish ('drerio').\n \n     Returns\n     -------\n@@ -32,6 +33,9 @@\n     elif org == 'mmusculus':\n         s.add_dataset_to_xml('mmusculus_gene_ensembl')\n         s.add_attribute_to_xml('mgi_symbol')\n+    elif org == 'drerio':\n+        s.add_dataset_to_xml('drerio_gene_ensembl')\n+        s.add_attribute_to_xml('zfin_id_symbol')\n     else:\n         logg.msg('organism ', str(org), ' is unavailable', v=4, no_indent=True)\n         return None\n@@ -55,9 +59,9 @@\n     ----------\n     host : {{'www.ensembl.org', ...}}\n         A valid BioMart host URL. Can be used to control genome build.\n-    org : {{'hsapiens', 'mmusculus'}}\n-        Organism to query. Currently available are human ('hsapiens') and mouse\n-        ('mmusculus').\n+    org : {{'hsapiens', 'mmusculus', 'drerio'}}\n+        Organism to query. Currently available are human ('hsapiens'), mouse\n+        ('mmusculus') and zebrafish ('drerio').\n     gene :\n         The gene symbol (e.g. 'hgnc_symbol' for human) for which to retrieve\n         coordinates.\n@@ -83,6 +87,9 @@\n     elif org == 'mmusculus':\n         s.add_dataset_to_xml('mmusculus_gene_ensembl')\n         s.add_attribute_to_xml('mgi_symbol')\n+    elif org == 'drerio':\n+        s.add_dataset_to_xml('drerio_gene_ensembl')\n+        s.add_attribute_to_xml('zfin_id_symbol')\n     else:\n         logg.msg('organism ', str(org), ' is unavailable', v=4, no_indent=True)\n         return None\n", "issue": "`NameError: name 'logg' is not defined` when using `sc.queries.mitochondrial_genes`\nI just tried\r\n```python\r\nimport scanpy.api as sc\r\nsc.queries.mitochondrial_genes('www.ensembl.org', 'strange_organism')\r\n```\r\nI would expect scanpy complains that it does not know `'strange_organism'`, but I get the error \r\n```python\r\n---------------------------------------------------------------------------\r\nNameError                                 Traceback (most recent call last)\r\n<ipython-input-13-6a41b361ab41> in <module>()\r\n      1 import scanpy.api as sc\r\n----> 2 sc.queries.mitochondrial_genes('www.ensembl.org', 'drerio')\r\n\r\n~/software/scanpy/scanpy/queries/__init__.py in mitochondrial_genes(host, org)\r\n     34         s.add_attribute_to_xml('mgi_symbol')\r\n     35     else:\r\n---> 36         logg.msg('organism ', str(org), ' is unavailable', v=4, no_indent=True)\r\n     37         return None\r\n     38     s.add_attribute_to_xml('chromosome_name')\r\n\r\nNameError: name 'logg' is not defined\r\n```\r\nIt seems to me like `queries/__init__.py` misses an `from .. import logging as logg` statement.\r\n\r\nWould maybe also make sense to show the the message that an organism is not available at verbosity level 1 instead of 4?\n", "before_files": [{"content": "import pandas as pd\n\n\ndef mitochondrial_genes(host, org):\n    \"\"\"Mitochondrial gene symbols for specific organism through BioMart.\n\n    Parameters\n    ----------\n    host : {{'www.ensembl.org', ...}}\n        A valid BioMart host URL.\n    org : {{'hsapiens', 'mmusculus'}}\n        Organism to query. Currently available are human ('hsapiens') and mouse\n        ('mmusculus').\n\n    Returns\n    -------\n    A `pd.Index` containing mitochondrial gene symbols.\n    \"\"\"\n    try:\n        from bioservices import biomart\n    except ImportError:\n        raise ImportError(\n            'You need to install the `bioservices` module.')\n    from io import StringIO\n    s = biomart.BioMart(host=host)\n\n    # building query\n    s.new_query()\n    if org == 'hsapiens':\n        s.add_dataset_to_xml('hsapiens_gene_ensembl')\n        s.add_attribute_to_xml('hgnc_symbol')\n    elif org == 'mmusculus':\n        s.add_dataset_to_xml('mmusculus_gene_ensembl')\n        s.add_attribute_to_xml('mgi_symbol')\n    else:\n        logg.msg('organism ', str(org), ' is unavailable', v=4, no_indent=True)\n        return None\n    s.add_attribute_to_xml('chromosome_name')\n    xml = s.get_xml()\n\n    # parsing mitochondrial gene symbols\n    res = pd.read_csv(StringIO(s.query(xml)), sep='\\t', header=None)\n    res.columns = ['symbol', 'chromosome_name']\n    res = res.dropna()\n    res = res[res['chromosome_name'] == 'MT']\n    res = res.set_index('symbol')\n    res = res[~res.index.duplicated(keep='first')]\n\n    return res.index\n\n\ndef gene_coordinates(host, org, gene, chr_exclude=[]):\n    \"\"\"Retrieve gene coordinates for specific organism through BioMart.\n    Parameters\n    ----------\n    host : {{'www.ensembl.org', ...}}\n        A valid BioMart host URL. Can be used to control genome build.\n    org : {{'hsapiens', 'mmusculus'}}\n        Organism to query. Currently available are human ('hsapiens') and mouse\n        ('mmusculus').\n    gene :\n        The gene symbol (e.g. 'hgnc_symbol' for human) for which to retrieve\n        coordinates.\n    chr_exclude :\n        A list of chromosomes to exclude from query.\n    Returns\n    -------\n    A `pd.DataFrame` containing gene coordinates for the specified gene symbol.\n    \"\"\"\n    try:\n        from bioservices import biomart\n    except ImportError:\n        raise ImportError(\n            'You need to install the `bioservices` module.')\n    from io import StringIO\n    s = biomart.BioMart(host=host)\n\n    # building query\n    s.new_query()\n    if org == 'hsapiens':\n        s.add_dataset_to_xml('hsapiens_gene_ensembl')\n        s.add_attribute_to_xml('hgnc_symbol')\n    elif org == 'mmusculus':\n        s.add_dataset_to_xml('mmusculus_gene_ensembl')\n        s.add_attribute_to_xml('mgi_symbol')\n    else:\n        logg.msg('organism ', str(org), ' is unavailable', v=4, no_indent=True)\n        return None\n    s.add_attribute_to_xml('chromosome_name')\n    s.add_attribute_to_xml('start_position')\n    s.add_attribute_to_xml('end_position')\n    xml = s.get_xml()\n\n    # parsing gene coordinates\n    res = pd.read_csv(StringIO(s.query(xml)), sep='\\t', header=None)\n    res.columns = ['symbol', 'chromosome_name', 'start', 'end']\n    res = res.dropna()\n    res = res[~res['chromosome_name'].isin(chr_exclude)]\n    res = res.set_index('symbol')\n\n    return res.loc[[gene], :]\n", "path": "scanpy/queries/__init__.py"}], "after_files": [{"content": "import pandas as pd\nfrom .. import logging as logg\n\n\ndef mitochondrial_genes(host, org):\n    \"\"\"Mitochondrial gene symbols for specific organism through BioMart.\n\n    Parameters\n    ----------\n    host : {{'www.ensembl.org', ...}}\n        A valid BioMart host URL.\n    org : {{'hsapiens', 'mmusculus', 'drerio'}}\n        Organism to query. Currently available are human ('hsapiens'), mouse\n        ('mmusculus') and zebrafish ('drerio').\n\n    Returns\n    -------\n    A `pd.Index` containing mitochondrial gene symbols.\n    \"\"\"\n    try:\n        from bioservices import biomart\n    except ImportError:\n        raise ImportError(\n            'You need to install the `bioservices` module.')\n    from io import StringIO\n    s = biomart.BioMart(host=host)\n\n    # building query\n    s.new_query()\n    if org == 'hsapiens':\n        s.add_dataset_to_xml('hsapiens_gene_ensembl')\n        s.add_attribute_to_xml('hgnc_symbol')\n    elif org == 'mmusculus':\n        s.add_dataset_to_xml('mmusculus_gene_ensembl')\n        s.add_attribute_to_xml('mgi_symbol')\n    elif org == 'drerio':\n        s.add_dataset_to_xml('drerio_gene_ensembl')\n        s.add_attribute_to_xml('zfin_id_symbol')\n    else:\n        logg.msg('organism ', str(org), ' is unavailable', v=4, no_indent=True)\n        return None\n    s.add_attribute_to_xml('chromosome_name')\n    xml = s.get_xml()\n\n    # parsing mitochondrial gene symbols\n    res = pd.read_csv(StringIO(s.query(xml)), sep='\\t', header=None)\n    res.columns = ['symbol', 'chromosome_name']\n    res = res.dropna()\n    res = res[res['chromosome_name'] == 'MT']\n    res = res.set_index('symbol')\n    res = res[~res.index.duplicated(keep='first')]\n\n    return res.index\n\n\ndef gene_coordinates(host, org, gene, chr_exclude=[]):\n    \"\"\"Retrieve gene coordinates for specific organism through BioMart.\n    Parameters\n    ----------\n    host : {{'www.ensembl.org', ...}}\n        A valid BioMart host URL. Can be used to control genome build.\n    org : {{'hsapiens', 'mmusculus', 'drerio'}}\n        Organism to query. Currently available are human ('hsapiens'), mouse\n        ('mmusculus') and zebrafish ('drerio').\n    gene :\n        The gene symbol (e.g. 'hgnc_symbol' for human) for which to retrieve\n        coordinates.\n    chr_exclude :\n        A list of chromosomes to exclude from query.\n    Returns\n    -------\n    A `pd.DataFrame` containing gene coordinates for the specified gene symbol.\n    \"\"\"\n    try:\n        from bioservices import biomart\n    except ImportError:\n        raise ImportError(\n            'You need to install the `bioservices` module.')\n    from io import StringIO\n    s = biomart.BioMart(host=host)\n\n    # building query\n    s.new_query()\n    if org == 'hsapiens':\n        s.add_dataset_to_xml('hsapiens_gene_ensembl')\n        s.add_attribute_to_xml('hgnc_symbol')\n    elif org == 'mmusculus':\n        s.add_dataset_to_xml('mmusculus_gene_ensembl')\n        s.add_attribute_to_xml('mgi_symbol')\n    elif org == 'drerio':\n        s.add_dataset_to_xml('drerio_gene_ensembl')\n        s.add_attribute_to_xml('zfin_id_symbol')\n    else:\n        logg.msg('organism ', str(org), ' is unavailable', v=4, no_indent=True)\n        return None\n    s.add_attribute_to_xml('chromosome_name')\n    s.add_attribute_to_xml('start_position')\n    s.add_attribute_to_xml('end_position')\n    xml = s.get_xml()\n\n    # parsing gene coordinates\n    res = pd.read_csv(StringIO(s.query(xml)), sep='\\t', header=None)\n    res.columns = ['symbol', 'chromosome_name', 'start', 'end']\n    res = res.dropna()\n    res = res[~res['chromosome_name'].isin(chr_exclude)]\n    res = res.set_index('symbol')\n\n    return res.loc[[gene], :]\n", "path": "scanpy/queries/__init__.py"}]}