human
Solve the following python programming problem given the following code:
def assert_fails_with(d, * exc_types, **kwargs) : 
    "Assert that 'd' will fail with one of 'exc_types'.

    The normal way to use this is to return the result of 'assert_fails_with'
    from your unit test.

    Note that this function is experimental and unstable.  Use at your own
    peril.
expect the API to change.

    :param d: A Deferred that is expected to fail.
    :param exc_types: The exception types that the Deferred is expected to
        fail with.
    :param failureException: An optional keyword argument.  If provided, will
        raise that exception instead of
        ``testtools.TestCase.failureException``.
    :return: A Deferred that will fail with an ``AssertionError`` if 'd' does
        not fail with one of the exception types.
    " 
    failureException = kwargs.pop ('failureException', None) 
    if (failureException is None) : 
        from testtools import TestCase 
        failureException = TestCase.failureException 
expected_names = ', '.join ((d.__name__ for exc_type in exc_types)) 
    def got_success(result) : 
        raise failureException (('%s not raised (%r returned)' % (expected_names, result))) 
def got_failure(failure) : 
        if failure.check (* exc_types) : 
            return failure.value 
raise failureException (('%s raised instead of %s:
 %s' % (failure.type.__name__, expected_names, failure.getTraceback ()))) 
return d.addCallbacks (got_success, got_failure) 

    
    

    Fix the buggy line: expected_names = ', '.join ((d.__name__ for exc_type in exc_types))
assistant
#Here is Python program to fix the buggy line: expected_names = ', '.

expected_names = ', '.join ((exc_type.__name__ for exc_type in exc_types))