code: def test_update_tags(data):
      tiffname = str(data.join("RGB.byte.tif"))
      with rasterio.open(tiffname, "r+") as f:
          f.update_tags(a="1", b="2")
          f.update_tags(1, c=3)
          with pytest.raises(IndexError):
              f.update_tags(4, d=4)
          assert f.tags() == {
              "AREA_OR_POINT": "Area",
              "a": "1",
              "b": "2",
          }
          assert ("c", "3") in f.tags(1).items()
      info = subprocess.check_output(["gdalinfo", tiffname]).decode(
          "utf-8"
      )
      assert re.search(
          r"Metadata:\W+a=1\W+AREA_OR_POINT=Area\W+b=2", info
      )
  
file_path: rasterio/tests/test_update.py
imports: import subprocess
  import re
  import affine
  import numpy
  import pytest
  import rasterio
label_desc: Use image node_id 1 for calling a global function with example usage: test_update_tags(data) without return types