prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  repr for particle unions
  The `__repr__` for particle unions should include the contents of `sub_types`
  
  </issue>
  <code>
  [start of yt/data_objects/unions.py]
  1 from yt.funcs import ensure_list
  2 
  3 class Union(object):
  4     def __init__(self, name, sub_types):
  5         self.name = name
  6         self.sub_types = ensure_list(sub_types)
  7 
  8     def __iter__(self):
  9         for st in self.sub_types:
  10             yield st
  11 
  12 class MeshUnion(Union):
  13     def __init__(self, name, sub_types):
  14         super(MeshUnion, self).__init__(name, sub_types)
  15
  [end of yt/data_objects/unions.py]
  [start of yt/data_objects/particle_unions.py]
  1 from .unions import Union
  2 
  3 class ParticleUnion(Union):
  4     def __init__(self, name, sub_types):
  5         super(ParticleUnion, self).__init__(name, sub_types)
  6
  [end of yt/data_objects/particle_unions.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/yt/data_objects/particle_unions.py b/yt/data_objects/particle_unions.py
  --- a/yt/data_objects/particle_unions.py
  +++ b/yt/data_objects/particle_unions.py
  @@ -1,5 +1,6 @@
   from .unions import Union
   
   class ParticleUnion(Union):
  +    _union_type = "particle"
       def __init__(self, name, sub_types):
           super(ParticleUnion, self).__init__(name, sub_types)
  diff --git a/yt/data_objects/unions.py b/yt/data_objects/unions.py
  --- a/yt/data_objects/unions.py
  +++ b/yt/data_objects/unions.py
  @@ -1,6 +1,7 @@
   from yt.funcs import ensure_list
   
   class Union(object):
  +    _union_type = ""
       def __init__(self, name, sub_types):
           self.name = name
           self.sub_types = ensure_list(sub_types)
  @@ -9,6 +10,11 @@
           for st in self.sub_types:
               yield st
   
  +    def __repr__(self):
  +        return "{} Union: '{}' composed of: {}".format(
  +            self._union_type.capitalize(), self.name, self.sub_types)
  +
   class MeshUnion(Union):
  +    _union_type = "mesh"
       def __init__(self, name, sub_types):
           super(MeshUnion, self).__init__(name, sub_types)
  
verification_info: {"golden_diff": "diff --git a/yt/data_objects/particle_unions.py b/yt/data_objects/particle_unions.py\n--- a/yt/data_objects/particle_unions.py\n+++ b/yt/data_objects/particle_unions.py\n@@ -1,5 +1,6 @@\n from .unions import Union\n \n class ParticleUnion(Union):\n+    _union_type = \"particle\"\n     def __init__(self, name, sub_types):\n         super(ParticleUnion, self).__init__(name, sub_types)\ndiff --git a/yt/data_objects/unions.py b/yt/data_objects/unions.py\n--- a/yt/data_objects/unions.py\n+++ b/yt/data_objects/unions.py\n@@ -1,6 +1,7 @@\n from yt.funcs import ensure_list\n \n class Union(object):\n+    _union_type = \"\"\n     def __init__(self, name, sub_types):\n         self.name = name\n         self.sub_types = ensure_list(sub_types)\n@@ -9,6 +10,11 @@\n         for st in self.sub_types:\n             yield st\n \n+    def __repr__(self):\n+        return \"{} Union: '{}' composed of: {}\".format(\n+            self._union_type.capitalize(), self.name, self.sub_types)\n+\n class MeshUnion(Union):\n+    _union_type = \"mesh\"\n     def __init__(self, name, sub_types):\n         super(MeshUnion, self).__init__(name, sub_types)\n", "issue": "repr for particle unions\nThe `__repr__` for particle unions should include the contents of `sub_types`\n", "before_files": [{"content": "from yt.funcs import ensure_list\n\nclass Union(object):\n    def __init__(self, name, sub_types):\n        self.name = name\n        self.sub_types = ensure_list(sub_types)\n\n    def __iter__(self):\n        for st in self.sub_types:\n            yield st\n\nclass MeshUnion(Union):\n    def __init__(self, name, sub_types):\n        super(MeshUnion, self).__init__(name, sub_types)\n", "path": "yt/data_objects/unions.py"}, {"content": "from .unions import Union\n\nclass ParticleUnion(Union):\n    def __init__(self, name, sub_types):\n        super(ParticleUnion, self).__init__(name, sub_types)\n", "path": "yt/data_objects/particle_unions.py"}]}