code: def is_c_extension(module: ModuleType) -> bool:
        # noqa
      assert inspect.ismodule(module), '"{}" not a module.'.format(module)
  
      # If this module was loaded by a PEP 302-compliant CPython-specific loader
      # loading only C extensions, this module is a C extension.
      if isinstance(getattr(module, '__loader__', None), ExtensionFileLoader):
          return True
  
      # If it's built-in, it's not a C extension.
      if is_builtin_module(module):
          return False
  
      # Else, fallback to filetype matching heuristics.
      #
      # Absolute path of the file defining this module.
      module_filename = inspect.getfile(module)
  
      # "."-prefixed filetype of this path if any or the empty string otherwise.
      module_filetype = os.path.splitext(module_filename)[1]
  
      # This module is only a C extension if this path's filetype is that of a
      # C extension specific to the current platform.
      return module_filetype in EXTENSION_SUFFIXES
docs: Modified from
      https://stackoverflow.com/questions/20339053/in-python-how-can-one-tell-if-a-module-comes-from-a-c-extension.
      
      ``True`` only if the passed module is a C extension implemented as a
      dynamically linked shared library specific to the current platform.
  
      Args:
          module: Previously imported module object to be tested.
  
      Returns:
          bool: ``True`` only if this module is a C extension.
          
      Examples:
          
      .. code-block:: python
      
          from cardinal_pythonlib.modules import is_c_extension
          
          import os
          import _elementtree as et
          import numpy
          import numpy.core.multiarray as numpy_multiarray
          
          is_c_extension(os)  # False
          is_c_extension(numpy)  # False
          is_c_extension(et)  # False on my system (Python 3.5.6). True in the original example.
          is_c_extension(numpy_multiarray)  # True