prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  ImageURL example in reference guide is broken
  The example doesn't render an image, just a gridded, empty plot.
  
  http://bokeh.pydata.org/en/latest/docs/reference/models/glyphs.html#bokeh.models.glyphs.ImageURL
  
  
  </issue>
  <code>
  [start of examples/glyphs/image_url.py]
  1 
  2 import numpy as np
  3 
  4 from bokeh.util.browser import view
  5 from bokeh.document import Document
  6 from bokeh.embed import file_html
  7 from bokeh.models.glyphs import ImageURL
  8 from bokeh.models import ColumnDataSource, Range1d, Plot, LinearAxis, Grid
  9 from bokeh.resources import INLINE
  10 
  11 url = "http://bokeh.pydata.org/en/latest/_static/bokeh-transparent.png"
  12 N = 5
  13 
  14 source = ColumnDataSource(dict(
  15     url = [url]*N,
  16     x1  = np.linspace(  0, 150, N),
  17     y1  = np.linspace(  0, 150, N),
  18     w1  = np.linspace( 10,  50, N),
  19     h1  = np.linspace( 10,  50, N),
  20     x2  = np.linspace(-50, 150, N),
  21     y2  = np.linspace(  0, 200, N),
  22 ))
  23 
  24 xdr = Range1d(start=-100, end=200)
  25 ydr = Range1d(start=-100, end=200)
  26 
  27 plot = Plot(title="ImageURL", x_range=xdr, y_range=ydr)
  28 
  29 image1 = ImageURL(url="url", x="x1", y="y1", w="w1", h="h1", anchor="center", global_alpha=0.2)
  30 plot.add_glyph(source, image1)
  31 
  32 image2 = ImageURL(url="url", x="x2", y="y2", w=20, h=20, anchor="top_left")
  33 plot.add_glyph(source, image2)
  34 
  35 image3 = ImageURL(url=dict(value=url), x=200, y=-100, anchor="bottom_right")
  36 plot.add_glyph(source, image3)
  37 
  38 xaxis = LinearAxis()
  39 plot.add_layout(xaxis, 'below')
  40 
  41 yaxis = LinearAxis()
  42 plot.add_layout(yaxis,'left')
  43 
  44 plot.add_layout(Grid(dimension=0, ticker=xaxis.ticker))
  45 plot.add_layout(Grid(dimension=1, ticker=yaxis.ticker))
  46 
  47 doc = Document( )
  48 doc.add_root(plot)
  49 
  50 if __name__ == "__main__":
  51     filename = "image_url.html"
  52     with open(filename, "w") as f:
  53         f.write(file_html(doc, INLINE, "Image URL Example"))
  54     print("Wrote %s" % filename)
  55     view(filename)
  56
  [end of examples/glyphs/image_url.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/examples/glyphs/image_url.py b/examples/glyphs/image_url.py
  --- a/examples/glyphs/image_url.py
  +++ b/examples/glyphs/image_url.py
  @@ -8,7 +8,7 @@
   from bokeh.models import ColumnDataSource, Range1d, Plot, LinearAxis, Grid
   from bokeh.resources import INLINE
   
  -url = "http://bokeh.pydata.org/en/latest/_static/bokeh-transparent.png"
  +url = "http://bokeh.pydata.org/en/latest/_static/images/logo.png"
   N = 5
   
   source = ColumnDataSource(dict(
  
verification_info: {"golden_diff": "diff --git a/examples/glyphs/image_url.py b/examples/glyphs/image_url.py\n--- a/examples/glyphs/image_url.py\n+++ b/examples/glyphs/image_url.py\n@@ -8,7 +8,7 @@\n from bokeh.models import ColumnDataSource, Range1d, Plot, LinearAxis, Grid\n from bokeh.resources import INLINE\n \n-url = \"http://bokeh.pydata.org/en/latest/_static/bokeh-transparent.png\"\n+url = \"http://bokeh.pydata.org/en/latest/_static/images/logo.png\"\n N = 5\n \n source = ColumnDataSource(dict(\n", "issue": "ImageURL example in reference guide is broken\nThe example doesn't render an image, just a gridded, empty plot.\n\nhttp://bokeh.pydata.org/en/latest/docs/reference/models/glyphs.html#bokeh.models.glyphs.ImageURL\n\n", "before_files": [{"content": "\nimport numpy as np\n\nfrom bokeh.util.browser import view\nfrom bokeh.document import Document\nfrom bokeh.embed import file_html\nfrom bokeh.models.glyphs import ImageURL\nfrom bokeh.models import ColumnDataSource, Range1d, Plot, LinearAxis, Grid\nfrom bokeh.resources import INLINE\n\nurl = \"http://bokeh.pydata.org/en/latest/_static/bokeh-transparent.png\"\nN = 5\n\nsource = ColumnDataSource(dict(\n    url = [url]*N,\n    x1  = np.linspace(  0, 150, N),\n    y1  = np.linspace(  0, 150, N),\n    w1  = np.linspace( 10,  50, N),\n    h1  = np.linspace( 10,  50, N),\n    x2  = np.linspace(-50, 150, N),\n    y2  = np.linspace(  0, 200, N),\n))\n\nxdr = Range1d(start=-100, end=200)\nydr = Range1d(start=-100, end=200)\n\nplot = Plot(title=\"ImageURL\", x_range=xdr, y_range=ydr)\n\nimage1 = ImageURL(url=\"url\", x=\"x1\", y=\"y1\", w=\"w1\", h=\"h1\", anchor=\"center\", global_alpha=0.2)\nplot.add_glyph(source, image1)\n\nimage2 = ImageURL(url=\"url\", x=\"x2\", y=\"y2\", w=20, h=20, anchor=\"top_left\")\nplot.add_glyph(source, image2)\n\nimage3 = ImageURL(url=dict(value=url), x=200, y=-100, anchor=\"bottom_right\")\nplot.add_glyph(source, image3)\n\nxaxis = LinearAxis()\nplot.add_layout(xaxis, 'below')\n\nyaxis = LinearAxis()\nplot.add_layout(yaxis,'left')\n\nplot.add_layout(Grid(dimension=0, ticker=xaxis.ticker))\nplot.add_layout(Grid(dimension=1, ticker=yaxis.ticker))\n\ndoc = Document( )\ndoc.add_root(plot)\n\nif __name__ == \"__main__\":\n    filename = \"image_url.html\"\n    with open(filename, \"w\") as f:\n        f.write(file_html(doc, INLINE, \"Image URL Example\"))\n    print(\"Wrote %s\" % filename)\n    view(filename)\n", "path": "examples/glyphs/image_url.py"}]}