code: def test_expand_hostlist(self):
      self.assertEqual(expand_hostlist("n1"), ["n1"])
      self.assertEqual(expand_hostlist("n[1,3]"), ["n1", "n3"])
      self.assertEqual(expand_hostlist("n[1-3]"), ["n1", "n2", "n3"])
      self.assertEqual(
          expand_hostlist("n[1-2],m5,o[3-4,6,7-9]"),
          ["n1", "n2", "m5", "o3", "o4", "o6", "o7", "o8", "o9"],
      )
      self.assertEqual(
          expand_hostlist("n[0001-0003],m5,o[009-011]"),
          ["n0001", "n0002", "n0003", "m5", "o009", "o010", "o011"],
      )
  
file_path: tensorflow-upstream/tensorflow/python/distribute/cluster_resolver/slurm_cluster_resolver_test.py
imports: import os
  from tensorflow.python.distribute.cluster_resolver.slurm_cluster_resolver import expand_hostlist
  from tensorflow.python.distribute.cluster_resolver.slurm_cluster_resolver import expand_tasks_per_node
  from tensorflow.python.distribute.cluster_resolver.slurm_cluster_resolver import SlurmClusterResolver
  from tensorflow.python.platform import test
  from tensorflow.python.training import server_lib
label_desc: Use image node_id 1 for calling the SlurmClusterResolverTest obj's underlying member method code with example usage: obj.test_expand_hostlist() without return types