code: def test_help(self):
      helptext = _TestScript.help()
      assert "My Description" in helptext
      assert "--foo" in helptext
      assert "--bar" not in helptext
  
      with testing_utils.capture_output() as output:
          with self.assertRaises(SystemExit):
              _TestScript.main("--help")
          assert "--foo" in output.getvalue()
          assert "--bar" not in output.getvalue()
  
      with testing_utils.capture_output() as output:
          with self.assertRaises(SystemExit):
              _TestScript.main("--helpall")
          assert "--foo" in output.getvalue()
          assert "--bar" in output.getvalue()
  
imports: import sys
  import unittest
  from unittest.mock import patch
  from parlai.core.params import ParlaiParser
  import parlai.core.script
  import parlai.utils.testing
label_desc: Use image node_id 6 for calling the TestScriptRegistry obj's underlying member method code with example usage: obj.test_help() without return types