code: def test_add_to_cache_invalid_combinations(mocker, caplog, dvc):
      cli_args = parse_args(
          ["add", "s3://bucket/foo", "s3://bucket/bar", "-o", "foo"]
      )
      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 --out"
          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 4 for calling a global function with example usage: test_add_to_cache_invalid_combinations(mocker, caplog, dvc) without return types