def _partition_version(segments):
    """Partition a version list into public and local parts."""
    needle = len(segments)
    for index, segment in enumerate(segments):
        try:
            int(segment)
        except ValueError:
            needle = index
            break
    return '.'.join(segments[:needle]), '.'.join(segments[needle:])
