<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def platform_information(_linux_distribution=None):
 """ detect platform information from remote host """

    linux_distribution = _linux_distribution or platform.linux_distribution
    distro, release, codename = linux_distribution()
    if not distro:
        distro, release, codename = parse_os_release()
    if not codename and 'debian' in distro.lower():  # this could be an empty string in Debian
        debian_codenames = {
            '10': 'buster',
            '9': 'stretch',
            '8': 'jessie',
            '7': 'wheezy',
            '6': 'squeeze',
        }
        major_version = release.split('.')[0]
        codename = debian_codenames.get(major_version, '')

        # In order to support newer jessie/sid or wheezy/sid strings we test this
        # if sid is buried in the minor, we should use sid anyway.
        if not codename and '/' in release:
            major, minor = release.split('/')
            if minor == 'sid':
                codename = minor
            else:
                codename = major
    if not codename and 'oracle' in distro.lower():  # this could be an empty string in Oracle linux
        codename = 'oracle'
    if not codename and 'virtuozzo linux' in distro.lower():  # this could be an empty string in Virtuozzo linux
        codename = 'virtuozzo'
    if not codename and 'arch' in distro.lower():  # this could be an empty string in Arch linux
        codename = 'arch'

    return (
        str(distro).rstrip(),
        str(release).rstrip(),
        str(codename).rstrip()
    )