code: def testCompletionBashScript(self):
      # A sanity check test to make sure the bash completion script satisfies
      # some basic assumptions.
      commands = [
          ["run"],
          ["halt"],
          ["halt", "--now"],
      ]
      script = completion._BashScript(
          name="command", commands=commands
      )  # pylint: disable=protected-access
      self.assertIn("command", script)
      self.assertIn("halt", script)
  
      assert_template = "{command})"
      for last_command in ["command", "halt"]:
          self.assertIn(
              assert_template.format(command=last_command), script
          )
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from fire import completion
  from fire import test_components
  from fire import testutils
label_desc: Use image node_id 1 for calling the TabCompletionTest obj's underlying member method code with example usage: obj.testCompletionBashScript() without return types