def can_run_c_extension(name=None):
    """
    Determine whether the given Python C extension loads correctly.

    If ``name`` is ``None``, tests all Python C extensions,
    and return ``True`` if and only if all load correctly.

    :param string name: the name of the Python C extension to test
    :rtype: bool
    """
    def can_run_cdtw():
        """ Python C extension for computing DTW """
        try:
            import aeneas.cdtw.cdtw
            return True
        except ImportError:
            return False

    def can_run_cmfcc():
        """ Python C extension for computing MFCC """
        try:
            import aeneas.cmfcc.cmfcc
            return True
        except ImportError:
            return False

    def can_run_cew():
        """ Python C extension for synthesizing with eSpeak """
        try:
            import aeneas.cew.cew
            return True
        except ImportError:
            return False

    def can_run_cfw():
        """ Python C extension for synthesizing with Festival """
        try:
            import aeneas.cfw.cfw
            return True
        except ImportError:
            return False

    if name == "cdtw":
        return can_run_cdtw()
    elif name == "cmfcc":
        return can_run_cmfcc()
    elif name == "cew":
        return can_run_cew()
    elif name == "cfw":
        return can_run_cfw()
    else:
        # NOTE cfw is still experimental!
        return can_run_cdtw() and can_run_cmfcc() and can_run_cew()
Determine whether the given Python C extension loads correctly.

    If ``name`` is ``None``, tests all Python C extensions,
    and return ``True`` if and only if all load correctly.

    :param string name: the name of the Python C extension to test
    :rtype: bool