prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  The compat modules should use absolute imports
  The [statsmodels.compat.collections](https://github.com/statsmodels/statsmodels/blob/a88830efc3a99cfbe0ebc9fbfd77820fe748fc59/statsmodels/compat/collections.py#L7) imports the namesake standard library module without requesting absolute imports.  While it seems to work in many cases, it causes a problem to packages that override `__import__`.  See enlnt/pyq#18.
  
  Please consider adding
  
  ```python
  from __future__ import absolute_import
  ```
  to the compat modules.
  
  </issue>
  <code>
  [start of statsmodels/compat/collections.py]
  1 '''backported compatibility functions for Python's collections
  2 
  3 '''
  4 
  5 try:
  6     #python >= 2.7
  7     from collections import OrderedDict
  8 except ImportError:
  9     #http://code.activestate.com/recipes/576693/
  10     #author: Raymond Hettinger
  11     from .ordereddict import OrderedDict
  12 
  13 try:
  14     #python >= 2.7
  15     from collections import Counter
  16 except ImportError:
  17     #http://code.activestate.com/recipes/576611/
  18     #author: Raymond Hettinger
  19     from .counter import Counter
  20
  [end of statsmodels/compat/collections.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/statsmodels/compat/collections.py b/statsmodels/compat/collections.py
  --- a/statsmodels/compat/collections.py
  +++ b/statsmodels/compat/collections.py
  @@ -1,6 +1,7 @@
   '''backported compatibility functions for Python's collections
   
   '''
  +from __future__ import absolute_import
   
   try:
       #python >= 2.7
  
verification_info: {"golden_diff": "diff --git a/statsmodels/compat/collections.py b/statsmodels/compat/collections.py\n--- a/statsmodels/compat/collections.py\n+++ b/statsmodels/compat/collections.py\n@@ -1,6 +1,7 @@\n '''backported compatibility functions for Python's collections\n \n '''\n+from __future__ import absolute_import\n \n try:\n     #python >= 2.7\n", "issue": "The compat modules should use absolute imports\nThe [statsmodels.compat.collections](https://github.com/statsmodels/statsmodels/blob/a88830efc3a99cfbe0ebc9fbfd77820fe748fc59/statsmodels/compat/collections.py#L7) imports the namesake standard library module without requesting absolute imports.  While it seems to work in many cases, it causes a problem to packages that override `__import__`.  See enlnt/pyq#18.\r\n\r\nPlease consider adding\r\n\r\n```python\r\nfrom __future__ import absolute_import\r\n```\r\nto the compat modules.\n", "before_files": [{"content": "'''backported compatibility functions for Python's collections\n\n'''\n\ntry:\n    #python >= 2.7\n    from collections import OrderedDict\nexcept ImportError:\n    #http://code.activestate.com/recipes/576693/\n    #author: Raymond Hettinger\n    from .ordereddict import OrderedDict\n\ntry:\n    #python >= 2.7\n    from collections import Counter\nexcept ImportError:\n    #http://code.activestate.com/recipes/576611/\n    #author: Raymond Hettinger\n    from .counter import Counter\n", "path": "statsmodels/compat/collections.py"}]}