code: def test_PyString_FromString(self):
      pythonapi.PyBytes_FromString.restype = py_object
      pythonapi.PyBytes_FromString.argtypes = (c_char_p,)
  
      s = b"abc"
      refcnt = sys.getrefcount(s)
      pyob = pythonapi.PyBytes_FromString(s)
      self.assertEqual(sys.getrefcount(s), refcnt)
      self.assertEqual(s, pyob)
      del pyob
      self.assertEqual(sys.getrefcount(s), refcnt)
  
file_path: cpython/Lib/test/test_ctypes/test_python_api.py
imports: import _ctypes
  import sys
  import unittest
  from test import support
  from ctypes import pythonapi, POINTER, create_string_buffer, sizeof, py_object, c_char_p, c_char, c_long, c_size_t
label_desc: Use image node_id 2 for calling the PythonAPITestCase obj's underlying member method code with example usage: obj.test_PyString_FromString() without return types