How to speed up a fabric run() call

Hello,

I use fabric on Windows 10 to connect to, and run, a python script on Ubuntu VM (installed locally on Windows). The script takes 7-8 seconds to run. How can it be sped up?

Script running on the VM (test.py):

print('returned value')

Calling script from Windows:

from fabric import Connection
c = Connection('vm-name', port=22, user='username', connect_kwargs={'password': 'my_pwd'})
with c.cd('/mnt/hgfs/Shared-with-VM'):
    c.run('python3 test3.py')
import io
f = io.StringIO()
print(f.getvalue())