prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <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?
  
  </issue>
  <code>
  [start of scanpy/queries/__init__.py]
  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 of scanpy/queries/__init__.py]
  </code>
  
  I need you to solve this issue by generating a single patch file that I can apply directly to this repository using git apply. Please respond with a single patch file in the following format.
  <patch>
  diff --git a/file.py b/file.py
  --- a/file.py
  +++ b/file.py
  @@ -1,27 +1,35 @@
   def euclidean(a, b):
  -    while b:
  -        a, b = b, a % b
  -    return a
  +    if b == 0:
  +        return a
  +    return euclidean(b, a % b)
   
   
   def bresenham(x0, y0, x1, y1):
       points = []
       dx = abs(x1 - x0)
       dy = abs(y1 - y0)
  -    sx = 1 if x0 < x1 else -1
  -    sy = 1 if y0 < y1 else -1
  -    err = dx - dy
  +    x, y = x0, y0
  +    sx = -1 if x0 > x1 else 1
  +    sy = -1 if y0 > y1 else 1
   
  -    while True:
  -        points.append((x0, y0))
  -        if x0 == x1 and y0 == y1:
  -            break
  -        e2 = 2 * err
  -        if e2 > -dy:
  -            err -= dy
  -            x0 += sx
  -        if e2 < dx:
  -            err += dx
  -            y0 += sy
  +    if dx > dy:
  +        err = dx / 2.0
  +        while x != x1:
  +            points.append((x, y))
  +            err -= dy
  +            if err < 0:
  +                y += sy
  +                err += dx
  +            x += sx
  +    else:
  +        err = dy / 2.0
  +        while y != y1:
  +            points.append((x, y))
  +            err -= dx
  +            if err < 0:
  +                x += sx
  +                err += dy
  +            y += sy
  +
  +    points.append((x, y))
       return points
  
  </patch>
golden_diff: 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
  
verification_info: {"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"}]}