code: def test_expand_tasks_per_node(self):
      self.assertEqual(expand_tasks_per_node("2"), [2])
      self.assertEqual(expand_tasks_per_node("2,1,3"), [2, 1, 3])
      self.assertEqual(expand_tasks_per_node("3(x2),2,1"), [3, 3, 2, 1])
      self.assertEqual(
          expand_tasks_per_node("3(x2),2,11(x4)"),
          [3, 3, 2, 11, 11, 11, 11],
      )
      self.assertEqual(
          expand_tasks_per_node("13(x10)"),
          [13, 13, 13, 13, 13, 13, 13, 13, 13, 13],
      )
  
file_path: tensorflow/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 2 for calling the SlurmClusterResolverTest obj's underlying member method code with example usage: obj.test_expand_tasks_per_node() without return types