code: def test_sort_jobs_with_bns_names(self):
      # bns names must be sorted in the bns order.
      dtensor_jobs = [
          "/bns/localhost/{task_id}".format(task_id=i)
          for i in range(16)
      ]
      os.environ[config._DT_JOBS] = ",".join(dtensor_jobs)
      self.assertListEqual(dtensor_jobs, config.jobs())
  
      dtensor_jobs = [
          "/bns/localhost/{task_id}:8888".format(task_id=i)
          for i in range(16)
      ]
      os.environ[config._DT_JOBS] = ",".join(dtensor_jobs)
      self.assertListEqual(dtensor_jobs, config.jobs())
  
      dtensor_jobs = [
          "/bns/localhost/{task_id}".format(task_id=100 - i)
          for i in range(16)
      ]
      os.environ[config._DT_JOBS] = ",".join(dtensor_jobs)
      with self.assertRaisesRegex(
          ValueError, "Unexpected DTENSOR_JOBS"
      ):
          config.jobs()
  
file_path: tensorflow/tensorflow/dtensor/python/tests/config_test.py
imports: import os
  from tensorflow.dtensor.python import config
  from tensorflow.dtensor.python.tests import test_util
  from tensorflow.python.eager import context
  from tensorflow.python.framework import device
  from tensorflow.python.platform import test
label_desc: Use image node_id 5 for calling the ConfigTest obj's underlying member method code with example usage: obj.test_sort_jobs_with_bns_names() without return types