docstr: Parse the content of the "SLURM_JOB_NODELIST" environment variable,
  which gives access to the list of hostnames that are part of the current job.
  
  In SLURM, the node list is formatted NODE_GROUP_1,NODE_GROUP_2,...,NODE_GROUP_N
  where each node group is formatted as: PREFIX[1-3,5,8] to define the hosts:
  [PREFIX1, PREFIX2, PREFIX3, PREFIX5, PREFIX8].
  
  Link: https://hpcc.umd.edu/hpcc/help/slurmenv.html
docstr_tok: ["Parse","the","content","of","the","``","SLURM_JOB_NODELIST","''","environment","variable",",","which","gives","access","to","the","list","of","hostnames","that","are","part","of","the","current","job",".","In","SLURM",",","the","node","list","is","formatted","NODE_GROUP_1",",","NODE_GROUP_2",",","...",",","NODE_GROUP_N","where","each","node","group","is","formatted","as",":","PREFIX","[","1-3,5,8","]","to","define","the","hosts",":","[","PREFIX1",",","PREFIX2",",","PREFIX3",",","PREFIX5",",","PREFIX8","]",".","Link",":","https",":","\/\/hpcc.umd.edu\/hpcc\/help\/slurmenv.html"]
code: def hostnames(self) -> tp.List[str]:
      """Parse the content of the "SLURM_JOB_NODELIST" environment variable,
      which gives access to the list of hostnames that are part of the current job.
  
      In SLURM, the node list is formatted NODE_GROUP_1,NODE_GROUP_2,...,NODE_GROUP_N
      where each node group is formatted as: PREFIX[1-3,5,8] to define the hosts:
      [PREFIX1, PREFIX2, PREFIX3, PREFIX5, PREFIX8].
  
      Link: https://hpcc.umd.edu/hpcc/help/slurmenv.html
      """
  
      node_list = os.environ.get(self._env["nodes"], "")
      if not node_list:
          return [self.hostname]
      return _parse_node_list(node_list)
  
imports: import functools
  import inspect
  import os
  import re
  import shlex
  import shutil
  import subprocess
  import sys
  import typing
  import uuid
  import warnings
  from pathlib import Path
  from ..core import core, job_environment, logger, utils
label_desc: Use image node_id 2 for calling the SlurmJobEnvironment obj's underlying member method code with example usage: obj.hostnames() and returns: _parse_node_list, list