@staticmethod<EOL><INDENT>def _shorten_version(ver, num_components=<NUM_LIT:2>):<DEDENT>
parts = ver.split('<STR_LIT:.>')<EOL>if len(parts) <= num_components:<EOL><INDENT>return ver<EOL><DEDENT>return '<STR_LIT:.>'.join(parts[:num_components])<EOL>
If ``ver`` is a dot-separated string with at least (num_components +1)
components, return only the first two. Else return the original string.

:param ver: version string
:type ver: str
:return: shortened (major, minor) version
:rtype: str