code: def test_parser_multinode():
      # First try no include/exclude
      hosts = {"worker-0": [0, 1, 2, 3], "worker-1": [0, 1, 2, 3]}
      ret = dsrun.parse_resource_filter(hosts)
      assert ret == hosts
  
      # include a node
      ret = dsrun.parse_resource_filter(
          hosts, include_str="worker-1:0,3"
      )
      assert ret == {"worker-1": [0, 3]}
  
      # exclude a node
      ret = dsrun.parse_resource_filter(hosts, exclude_str="worker-1")
      assert ret == {"worker-0": [0, 1, 2, 3]}
  
      # exclude part of each node
      ret = dsrun.parse_resource_filter(
          hosts, exclude_str="worker-0:0,1@worker-1:3"
      )
      assert ret == {"worker-0": [2, 3], "worker-1": [0, 1, 2]}
  
file_path: DeepSpeed/tests/unit/launcher/test_run.py
imports: import pytest
  from deepspeed.launcher import runner
label_desc: Use image node_id 3 for calling a global function with example usage: test_parser_multinode() without return types