code: def split_fragment(cls, fragment):
      
      def likely_version_component(enumerated_fragment):
        return sum(bool(v and v[0].isdigit()) for v in enumerated_fragment[1].split('.'))
      fragments = fragment.split('-')
      if len(fragments) == 1:
        return fragment, ''
      max_index, _ = max(enumerate(fragments), key=likely_version_component)
      return '-'.join(fragments[0:max_index]), '-'.join(fragments[max_index:])
docs: A heuristic used to split a string into version name/fragment:
  
         >>> SourcePackage.split_fragment('pysolr-2.1.0-beta')
         ('pysolr', '2.1.0-beta')
         >>> SourcePackage.split_fragment('cElementTree-1.0.5-20051216')
         ('cElementTree', '1.0.5-20051216')
         >>> SourcePackage.split_fragment('pil-1.1.7b1-20090412')
         ('pil', '1.1.7b1-20090412')
         >>> SourcePackage.split_fragment('django-plugin-2-2.3')
         ('django-plugin-2', '2.3')