code: def test_rsync_exclude_and_filter():
      process_runner = MockProcessRunner()
      provider = MockProvider()
      provider.create_node({}, {}, 1)
      cluster_name = "cluster"
      args = {
          "log_prefix": "prefix",
          "node_id": "0",
          "provider": provider,
          "auth_config": auth_config,
          "cluster_name": cluster_name,
          "process_runner": process_runner,
          "use_internal_ip": False,
      }
      cmd_runner = SSHCommandRunner(**args)
  
      local_mount = "/home/ubuntu/base/mount/"
      remote_mount = "/root/protected_mount/"
  
      process_runner.respond_to_call("docker inspect -f", ["true"])
      cmd_runner.run_rsync_up(
          local_mount,
          remote_mount,
          options={
              "docker_mount_if_possible": True,
              "rsync_exclude": ["test"],
              "rsync_filter": [".ignore"],
          },
      )
  
      process_runner.assert_has_call(
          "1.2.3.4",
          pattern="--exclude test --filter dir-merge,- .ignore",
      )
  
file_path: ray/python/ray/tests/test_command_runner.py
imports: import pytest
  from ray.tests.test_autoscaler import MockProvider, MockProcessRunner
  from ray.autoscaler.command_runner import CommandRunnerInterface
  from ray.autoscaler._private.command_runner import SSHCommandRunner, DockerCommandRunner, _with_environment_variables
  from ray.autoscaler.sdk import get_docker_host_mount_location
  from getpass import getuser
  import hashlib
label_desc: Use image node_id 7 for calling a global function with example usage: test_rsync_exclude_and_filter() without return types