code: def test_update_import_url_to_remote_directory_changed_contents(
      tmp_dir, dvc, local_workspace, local_remote
  ):
      local_workspace.gen(
          {"data": {"foo": "foo", "bar": {"baz": "baz"}}}
      )
      stage = dvc.imp_url("remote://workspace/data", to_remote=True)
  
      local_workspace.gen(
          {
              "data": {
                  "foo": "not_foo",
                  "foo2": "foo",
                  "bar": {"baz2": "baz2"},
              }
          }
      )
      (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": "not_foo",
          "foo2": "foo",
          "bar": {"baz": "baz", "baz2": "baz2"},
      }
  
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 15 for calling a global function with example usage: test_update_import_url_to_remote_directory_changed_contents(tmp_dir, dvc, local_workspace, local_remote) without return types