def main(user, pkey, password, hosts_str, cmd, file_path, dir_path, delete_dir):
    hosts = hosts_str.split(",")
    client = ParallelSSHClient(user=user, pkey=pkey, password=password, hosts=hosts)
    pp = pprint.PrettyPrinter(indent=4)

    if file_path:
        if not os.path.exists(file_path):
            raise Exception('File not found.')
        results = client.put(file_path, '/home/lakshmi/test_file', mode="0660")
        pp.pprint(results % 'Copy results: \n%s')
        results = client.run('ls -rlth')
        pp.pprint('ls results: \n%s' % results)

    if dir_path:
        if not os.path.exists(dir_path):
            raise Exception('File not found.')
        results = client.put(dir_path, '/home/lakshmi/', mode="0660")
        pp.pprint('Copy results: \n%s' % results)
        results = client.run('ls -rlth')
        pp.pprint('ls results: \n%s' % results)

    if cmd:
        results = client.run(cmd)
        pp.pprint('cmd results: \n%s' % results)

    if delete_dir:
        results = client.delete_dir(delete_dir, force=True)
        pp.pprint('Delete results: \n%s' % results)
dataset/ETHPy150Open StackStorm/st2/st2common/bin/paramiko_ssh_evenlets_tester.py/main/swapped operands of `%`