code: def test_optional_defaults_to_none(self, field_name):
      meta = metadata.Metadata.from_raw({}, validate=False)
      assert getattr(meta, field_name) is None
  
imports: import pathlib
  import pytest
  from packaging import metadata, requirements, specifiers, utils, version
  from packaging.metadata import ExceptionGroup
label_desc: Use image node_id 39 for calling the TestMetadata obj's underlying member method code with example usage: obj.test_optional_defaults_to_none(field_name) without return types