in cli/slurm_check.py [0:0]
def _expand_slurm_node_pattern(node_pattern: str) -> list[str]:
"""Expands a slurm node pattern into a list of nodes."""
slurm_nodelist_expansion_cmd = [
'scontrol',
'show',
'hostname',
node_pattern,
]
output = subprocess.run(
slurm_nodelist_expansion_cmd,
text=True,
check=True,
capture_output=True,
).stdout.strip()
nodes = output.split('\n')
return nodes