def sshagent_run(command, use_sudo=False):

    if use_sudo:
        command = 'sudo %s' % command

    cwd = env.get('cwd', '')
    if cwd:
        cwd = 'cd %s && ' % cwd
    real_command = cwd + command

    with settings(cwd=''):
        if env.port:
            port = env.port
            host = env.host
        else:
            try:
                # catch the port number to pass to ssh
                host, port = env.host.split(':')
            except ValueError:
                port = None
                host = env.host

        if port:
            local('ssh -p %s -A %s "%s"' % (port, host, real_command))
        else:
            local('ssh -A %s "%s"' % (env.host, real_command))
Validate the provided data file for correctness against the provided
dataset/ETHPy150Open bueda/ops/buedafab/operations.py/sshagent_run--crossover with--dataset/ETHPy150Open PublicMapping/DistrictBuilder/django/publicmapping/redistricting/__init__.py/StoredConfig.validate