class_docstr: Test API-specific details for __import__ (e.g. raising the right
  exception when passing in an int for the module name).
code: def test_name_requires_rparition(self):
      # Raise TypeError if a non-string is passed in for the module name.
      with self.assertRaises(TypeError):
          self.__import__(42)
  
imports: from test.test_importlib import util
  from importlib import machinery
  import sys
  import types
  import unittest
  import warnings
label_desc: Use image node_id 2 for calling the APITest obj's underlying member method code with example usage: obj.test_name_requires_rparition() without return types