def _implementation():
implementation = platform.python_implementation()<EOL>if implementation == '<STR_LIT>':<EOL><INDENT>implementation_version = platform.python_version()<EOL><DEDENT>elif implementation == '<STR_LIT>':<EOL><INDENT>implementation_version = '<STR_LIT>' % (sys.pypy_version_info.major,<EOL>sys.pypy_version_info.minor,<EOL>sys.pypy_version_info.micro)<EOL>if sys.pypy_version_info.releaselevel != '<STR_LIT>':<EOL><INDENT>implementation_version = '<STR_LIT>'.join([<EOL>implementation_version, sys.pypy_version_info.releaselevel<EOL>])<EOL><DEDENT><DEDENT>elif implementation == '<STR_LIT>':<EOL><INDENT>implementation_version = platform.python_version()  <EOL><DEDENT>elif implementation == '<STR_LIT>':<EOL><INDENT>implementation_version = platform.python_version()  <EOL><DEDENT>else:<EOL><INDENT>implementation_version = '<STR_LIT>'<EOL><DEDENT>return {'<STR_LIT:name>': implementation, '<STR_LIT:version>': implementation_version}<EOL>
Return a dict with the Python implementation and version.

    Provide both the name and the version of the Python implementation
    currently running. For example, on CPython 2.7.5 it will return
    {'name': 'CPython', 'version': '2.7.5'}.

    This function works best on CPython and PyPy: in particular, it probably
    doesn't work for Jython or IronPython. Future investigation should be done
    to work out the correct shape of the code for those platforms.