code: def test_update_import_url_to_remote_directory(
      mocker, tmp_dir, dvc, workspace, local_remote
  ):
      workspace.gen({"data": {"foo": "foo", "bar": {"baz": "baz"}}})
      stage = dvc.imp_url("remote://workspace/data", to_remote=True)
  
      workspace.gen(
          {
              "data": {
                  "foo2": "foo2",
                  "bar": {"baz2": "baz2"},
                  "repeated_hashes": {
                      "foo": "foo",
                      "baz": "baz",
                      "foo_with_different_name": "foo",
                  },
              }
          }
      )
  
      (updated,) = dvc.update(stage.path, to_remote=True)
  
      assert stage.deps[0].hash_info != updated.deps[0].hash_info
      assert stage.outs[0].hash_info != updated.outs[0].hash_info
  
      dvc.pull("data")
      assert (tmp_dir / "data").read_text() == {
          "foo": "foo",
          "foo2": "foo2",
          "bar": {"baz": "baz", "baz2": "baz2"},
          "repeated_hashes": {
              "foo": "foo",
              "baz": "baz",
              "foo_with_different_name": "foo",
          },
      }
  
imports: import os
  import pytest
  from dvc.dependency import base
  from dvc.dvcfile import load_file
  from dvc.exceptions import InvalidArgumentError
  from dvc.testing.tmp_dir import make_subrepo
label_desc: Use image node_id 14 for calling a global function with example usage: test_update_import_url_to_remote_directory(mocker, tmp_dir, dvc, workspace, local_remote) without return types