code: def test_add_to_remote_invalid_combinations(mocker, caplog, dvc):
      cli_args = parse_args(
          ["add", "s3://bucket/foo", "s3://bucket/bar", "--to-remote"]
      )
      assert cli_args.func == CmdAdd
  
      cmd = cli_args.func(cli_args)
      with caplog.at_level(logging.ERROR, logger="dvc"):
          assert cmd.run() == 1
          expected_msg = (
              "multiple targets can't be used with --to-remote"
          )
          assert expected_msg in caplog.text
  
      for option, value in (
          ("--remote", "remote"),
          ("--remote-jobs", "4"),
      ):
          cli_args = parse_args(["add", "foo", option, value])
  
          cmd = cli_args.func(cli_args)
          with caplog.at_level(logging.ERROR, logger="dvc"):
              assert cmd.run() == 1
              expected_msg = (
                  f"{option} can't be used without --to-remote"
              )
              assert expected_msg in caplog.text
  
imports: import logging
  from dvc.cli import parse_args
  from dvc.commands.add import CmdAdd
label_desc: Use image node_id 3 for calling a global function with example usage: test_add_to_remote_invalid_combinations(mocker, caplog, dvc) without return types