human
Solve the following python programming problem given the following code:
@simple_decorator
def online_only(test_func):
assistant
#Here is the Python code you requested.

    """Decorate a test to check online state.
    """
    def _test(*args, **kwargs):
        if (not is_online()):
            raise nose.SkipTest(u'Host    is    not    online')
        return test_func(*args, **kwargs)
    return _test