class ImposterException(StandardError):
    def __init__(self, response):
        self._response = response

import sys


if sys.version_info.major == 2:
    error_base_class = StandardError
elif sys.version_info.major == 3:
    error_base_class = Exception
else:
    raise RuntimeError('Unsupported Python version: {}'.format(sys.version))


class ImposterException(error_base_class):
    def __init__(self, response):
        self._response = response

Make Python 2 and 3 compatible
Make Python 2 and 3 compatible

- class ImposterException(StandardError):
+ import sys
+ 
+ 
+ if sys.version_info.major == 2:
+     error_base_class = StandardError
+ elif sys.version_info.major == 3:
+     error_base_class = Exception
+ else:
+     raise RuntimeError('Unsupported Python version: {}'.format(sys.version))
+ 
+ 
+ class ImposterException(error_base_class):
      def __init__(self, response):
          self._response = response
  
Make Python 2 and 3 compatible
## Code Before:
class ImposterException(StandardError):
    def __init__(self, response):
        self._response = response

## Instruction:
Make Python 2 and 3 compatible
## Code After:
import sys


if sys.version_info.major == 2:
    error_base_class = StandardError
elif sys.version_info.major == 3:
    error_base_class = Exception
else:
    raise RuntimeError('Unsupported Python version: {}'.format(sys.version))


class ImposterException(error_base_class):
    def __init__(self, response):
        self._response = response
