from textwrap import dedent


def get_platform(*args, **kwargs):
    """
    Returns the platform of the remote host.
    """
    cmd = dedent("""\
        python - <<DOC
        from __future__ import print_function
        import platform
        print(platform.system())
        DOC
        """).strip()
    runner = kwargs.get('runner', None)
    return runner.run_command(cmd, *args, **kwargs).strip()