code: def test_long_has_args(self):
      has_arg, option = getopt.long_has_args("abc", ["abc="])
      self.assertTrue(has_arg)
      self.assertEqual(option, "abc")
  
      has_arg, option = getopt.long_has_args("abc", ["abc"])
      self.assertFalse(has_arg)
      self.assertEqual(option, "abc")
  
      has_arg, option = getopt.long_has_args("abc", ["abcd"])
      self.assertFalse(has_arg)
      self.assertEqual(option, "abcd")
  
      self.assertError(getopt.long_has_args, "abc", ["def"])
      self.assertError(getopt.long_has_args, "abc", [])
      self.assertError(getopt.long_has_args, "abc", ["abcd", "abcde"])
  
file_path: cpython/Lib/test/test_getopt.py
imports: from test.support.os_helper import EnvironmentVarGuard
  import doctest
  import unittest
  import getopt
label_desc: Use image node_id 4 for calling the GetoptTests obj's underlying member method code with example usage: obj.test_long_has_args() without return types