def supported_versions(django, cms):
cms_version = None<EOL>django_version = None<EOL>try:<EOL><INDENT>cms_version = Decimal(cms)<EOL><DEDENT>except (ValueError, InvalidOperation):<EOL><INDENT>try:<EOL><INDENT>cms_version = CMS_VERSION_MATRIX[str(cms)]<EOL><DEDENT>except KeyError:<EOL><INDENT>pass<EOL><DEDENT><DEDENT>try:<EOL><INDENT>django_version = Decimal(django)<EOL><DEDENT>except (ValueError, InvalidOperation):<EOL><INDENT>try:<EOL><INDENT>django_version = DJANGO_VERSION_MATRIX[str(django)]<EOL><DEDENT>except KeyError:  <EOL><INDENT>pass<EOL><DEDENT><DEDENT>try:<EOL><INDENT>if (<EOL>cms_version and django_version and<EOL>not (LooseVersion(VERSION_MATRIX[compat.unicode(cms_version)][<NUM_LIT:0>]) <=<EOL>LooseVersion(compat.unicode(django_version)) <=<EOL>LooseVersion(VERSION_MATRIX[compat.unicode(cms_version)][<NUM_LIT:1>]))<EOL>):<EOL><INDENT>raise RuntimeError(<EOL>'<STR_LIT>'<EOL>'<STR_LIT>'.format(django_version, cms_version)<EOL>)<EOL><DEDENT><DEDENT>except KeyError:<EOL><INDENT>raise RuntimeError(<EOL>'<STR_LIT>'<EOL>'<STR_LIT>'.format(django_version, cms_version)<EOL>)<EOL><DEDENT>return (<EOL>compat.unicode(django_version) if django_version else django_version,<EOL>compat.unicode(cms_version) if cms_version else cms_version<EOL>)<EOL>
Convert numeric and literal version information to numeric format