code: def tmp_resource_spec_with_bandwidth(tmp_path):
      p = tmp_path / "resource_spec.yml"
      p.write_text(
          textwrap.dedent(
              """
          nodes:
            - address: 1.1.1.1
              cpus: [0]
              chief: true
              network_bandwidth: 123
              ssh_config: conf
            - address: 2.2.2.2
              cpus: [0]
              network_bandwidth: 456
              ssh_config: conf
          ssh:
            conf:
              username: 'root'
              key_file: '/root/.ssh/id_rsa'
              port: 12345
          """
          )
      )
      return p
  
imports: from autodist.resource_spec import ResourceSpec
  import pytest
  import os
  import textwrap
label_desc: Use image node_id 2 for calling a global function with example usage: tmp_resource_spec_with_bandwidth(tmp_path) and returns: p