code: def tmp_resource_spec(tmp_path):
      p = tmp_path / "resource_spec.yml"
      p.write_text(
          textwrap.dedent(
              """
          nodes:
              - address: localhost
                gpus: [0,1]
          """
          )
      )
      return p
  
imports: import pytest
  import textwrap
label_desc: Use image node_id 1 for calling a global function with example usage: tmp_resource_spec(tmp_path) and returns: p