code: def test_field_works(self) -> None:
      value = self.card.field("field1").as_(str)
  
      assert value == "foo1"
  
      value = self.card.field("field2").field("sub-field1").as_(str)
  
      assert value == "sub-foo1"
  
      value = self.card.field("field2").field("sub-field2").as_(str)
  
      assert value == "sub-foo2"
  
      int_value = self.card.field("field3").as_(int)
  
      assert int_value == 3
  
imports: from os import PathLike
  from pathlib import Path
  import pytest
  from fairseq2.assets import AssetCard, AssetCardError, AssetCardFieldNotFoundError
label_desc: Use image node_id 2 for calling the TestAssetCard obj's underlying member method code with example usage: obj.test_field_works() without return types