def _create_local_paths(env):
    with settings(hide('warnings', 'running', 'stdout', 'stderr'),
                  warn_only=True):
        # This is the first point we call into a remote host - make sure
        # it does not fail silently by calling a dummy run
        env.logger.info("Now, testing connection to host...")
        test = env.safe_run("pwd")
        # If there is a connection failure, the rest of the code is (sometimes) not
        # reached - for example with Vagrant the program just stops after above run
        # command.
        if test != None:
            env.logger.info("Connection to host appears to work!")
        else:
            raise NotImplementedError("Connection to host failed")
        env.logger.debug("Expand paths")
        if "local_install" in env:
            if not env.safe_exists(env.local_install):
                env.safe_sudo("mkdir -p %s" % env.local_install)
                user = env.safe_run_output("echo $USER")
                env.safe_sudo("chown -R %s %s" % (user, env.local_install))
            with cd(env.local_install):
                result = env.safe_run_output("pwd")
                env.local_install = result
Cleans up the args that weren't passed in
dataset/ETHPy150Open chapmanb/cloudbiolinux/cloudbio/utils.py/_create_local_paths--crossover with--dataset/ETHPy150Open saltstack/salt/salt/utils/kickstart.py/clean_args