code: def parse_inclusion_exclusion(resource_pool, inclusion, exclusion):
      active_resources = collections.OrderedDict()
      for hostname, slots in resource_pool.items():
          active_resources[hostname] = list(range(slots))
  
      return parse_resource_filter(
          active_resources, include_str=inclusion, exclude_str=exclusion
      )
  
imports: import os
  import sys
  import json
  import base64
  import argparse
  import subprocess
  import collections
  from copy import deepcopy
  import signal
  import time
  import torch.cuda
  from .multinode_runner import PDSHRunner, OpenMPIRunner, MVAPICHRunner, SlurmRunner
  from .constants import PDSH_LAUNCHER, OPENMPI_LAUNCHER, MVAPICH_LAUNCHER, SLURM_LAUNCHER
  from ..constants import TORCH_DISTRIBUTED_DEFAULT_PORT
  from ..nebula.constants import NEBULA_EXPORT_ENVS
  from ..utils import logger
  from ..autotuning import Autotuner
label_desc: Use image node_id 5 for calling a global function with example usage: parse_inclusion_exclusion(resource_pool, inclusion, exclusion) and returns: parse_resource_filter