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