human
I wrote the below code

    from pytest import skip
    t.network = True
    @wraps(t)
    def wrapper(*args, **kwargs):
        if (check_before_test and (not raise_on_error)):
            if (not can_connect(url, error_classes)):
                skip()
        try:
            return t(*args, **kwargs)
        except Exception as e:
            errno = getattr(e, 'errno', None)
            if ((not errno) and hasattr(errno, 'reason')):
                errno = getattr(e.reason, 'errno', None)
            if (errno in skip_errnos):
                skip(('Skipping    test    due    to    known    errno    and    error    %s' % e))
            try:
                e_str = traceback.format_exc(e)
            except:
                e_str = str(e)
            if any([(m.lower() in e_str.lower()) for m in _skip_on_messages]):
                skip(('Skipping    test    because    exception    message    is    known    and    error    %s' % e))
            if (not isinstance(e, error_classes)):
                raise
            if (raise_on_error or can_connect(url, error_classes)):
                raise
            else:
                skip(('Skipping    test    due    to    lack    of    connectivity    and    error    %s' % e))
    return wrapper

What's a good function header?
assistant
#Here's a good function header.

@optional_args
def network(t, url='http://www.google.com', raise_on_error=_RAISE_NETWORK_ERROR_DEFAULT, check_before_test=False, error_classes=_network_error_classes, skip_errnos=_network_errno_vals, _skip_on_messages=_network_error_messages):