def testfn(arg):
    """
    Test function for L{deferred} decorator.

    Raises L{ValueError} if 42 is passed, otherwise returns whatever was
    passed.
    """
    if arg == 42:
        raise ValueError('Oh noes')
    return arg