code: def test_as_uri_raises_error_when_field_type_is_incorrect(
      self,
  ) -> None:
      with pytest.raises(
          AssetCardError,
          match=rf"The value of the field 'field3' of the asset card 'test-card' must be of type `{str}` or `{PathLike}`, but is of type `{int}` instead\.$",
      ):
          self.card.field("field3").as_uri()
  
imports: from os import PathLike
  from pathlib import Path
  import pytest
  from fairseq2.assets import AssetCard, AssetCardError, AssetCardFieldNotFoundError
label_desc: Use image node_id 18 for calling the TestAssetCard obj's underlying member method code with example usage: obj.test_as_uri_raises_error_when_field_type_is_incorrect() without return types