prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  Support built-in vega themes
  See [vega-themes](https://github.com/vega/vega-themes). Themes should be supported via the current theme infrastructure, maybe something like this:
  ```python
  alt.themes.enable('vega.themes.dark')
  ```
  We'll have to think about how to best populate the list of available themes, and how to make this work cleanly with user-specified themes from within Altair.
  
  </issue>
  <code>
  [start of altair/vegalite/v3/theme.py]
  1 """Tools for enabling and registering chart themes"""
  2 
  3 from ...utils.theme import ThemeRegistry
  4 
  5 # The entry point group that can be used by other packages to declare other
  6 # renderers that will be auto-detected. Explicit registration is also
  7 # allowed by the PluginRegistery API.
  8 ENTRY_POINT_GROUP = 'altair.vegalite.v3.theme'  # type: str
  9 themes = ThemeRegistry(entry_point_group=ENTRY_POINT_GROUP)
  10 
  11 themes.register('default', lambda: {"config": {"view": {"width": 400, "height": 300},
  12                                                "mark": {"tooltip": None}}})
  13 themes.register('opaque', lambda: {"config": {"background": "white",
  14                                               "view": {"width": 400, "height": 300},
  15                                               "mark": {"tooltip": None}}})
  16 themes.register('none', lambda: {})
  17 themes.enable('default')
  18
  [end of altair/vegalite/v3/theme.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/altair/vegalite/v3/theme.py b/altair/vegalite/v3/theme.py
  --- a/altair/vegalite/v3/theme.py
  +++ b/altair/vegalite/v3/theme.py
  @@ -2,6 +2,23 @@
   
   from ...utils.theme import ThemeRegistry
   
  +VEGA_THEMES = ['ggplot2', 'quartz', 'vox', 'fivethirtyeight', 'dark', 'latimes']
  +
  +
  +class VegaTheme(object):
  +    """Implementation of a builtin vega theme."""
  +    def __init__(self, theme):
  +        self.theme = theme
  +        
  +    def __call__(self):
  +        return {"usermeta": {"embedOptions": {"theme": self.theme}},
  +                "config": {"view": {"width": 400, "height": 300},
  +                           "mark": {"tooltip": None}}}
  +
  +    def __repr__(self):
  +        return "VegaTheme({!r})".format(self.theme)
  +
  +
   # The entry point group that can be used by other packages to declare other
   # renderers that will be auto-detected. Explicit registration is also
   # allowed by the PluginRegistery API.
  @@ -14,4 +31,8 @@
                                                 "view": {"width": 400, "height": 300},
                                                 "mark": {"tooltip": None}}})
   themes.register('none', lambda: {})
  +  
  +for theme in VEGA_THEMES:
  +    themes.register(theme, VegaTheme(theme))
  +
   themes.enable('default')
  
verification_info: {"golden_diff": "diff --git a/altair/vegalite/v3/theme.py b/altair/vegalite/v3/theme.py\n--- a/altair/vegalite/v3/theme.py\n+++ b/altair/vegalite/v3/theme.py\n@@ -2,6 +2,23 @@\n \n from ...utils.theme import ThemeRegistry\n \n+VEGA_THEMES = ['ggplot2', 'quartz', 'vox', 'fivethirtyeight', 'dark', 'latimes']\n+\n+\n+class VegaTheme(object):\n+    \"\"\"Implementation of a builtin vega theme.\"\"\"\n+    def __init__(self, theme):\n+        self.theme = theme\n+        \n+    def __call__(self):\n+        return {\"usermeta\": {\"embedOptions\": {\"theme\": self.theme}},\n+                \"config\": {\"view\": {\"width\": 400, \"height\": 300},\n+                           \"mark\": {\"tooltip\": None}}}\n+\n+    def __repr__(self):\n+        return \"VegaTheme({!r})\".format(self.theme)\n+\n+\n # The entry point group that can be used by other packages to declare other\n # renderers that will be auto-detected. Explicit registration is also\n # allowed by the PluginRegistery API.\n@@ -14,4 +31,8 @@\n                                               \"view\": {\"width\": 400, \"height\": 300},\n                                               \"mark\": {\"tooltip\": None}}})\n themes.register('none', lambda: {})\n+  \n+for theme in VEGA_THEMES:\n+    themes.register(theme, VegaTheme(theme))\n+\n themes.enable('default')\n", "issue": "Support built-in vega themes\nSee [vega-themes](https://github.com/vega/vega-themes). Themes should be supported via the current theme infrastructure, maybe something like this:\r\n```python\r\nalt.themes.enable('vega.themes.dark')\r\n```\r\nWe'll have to think about how to best populate the list of available themes, and how to make this work cleanly with user-specified themes from within Altair.\n", "before_files": [{"content": "\"\"\"Tools for enabling and registering chart themes\"\"\"\n\nfrom ...utils.theme import ThemeRegistry\n\n# The entry point group that can be used by other packages to declare other\n# renderers that will be auto-detected. Explicit registration is also\n# allowed by the PluginRegistery API.\nENTRY_POINT_GROUP = 'altair.vegalite.v3.theme'  # type: str\nthemes = ThemeRegistry(entry_point_group=ENTRY_POINT_GROUP)\n\nthemes.register('default', lambda: {\"config\": {\"view\": {\"width\": 400, \"height\": 300},\n                                               \"mark\": {\"tooltip\": None}}})\nthemes.register('opaque', lambda: {\"config\": {\"background\": \"white\",\n                                              \"view\": {\"width\": 400, \"height\": 300},\n                                              \"mark\": {\"tooltip\": None}}})\nthemes.register('none', lambda: {})\nthemes.enable('default')\n", "path": "altair/vegalite/v3/theme.py"}]}