human
Give me a the Python code you requested given the following:
Complete the below
@attr('root')
def onlyroot(meth):

    ''''Function to decorate tests that should be called as root.
    Raises a nose SkipTest exception if the user doesn\'t have root permissions.'
    '''
assistant
#Here is the Python code you requested.
    @wraps(meth)
    def test_inner_onlyroot(self, *args, **kwds):
        'Note    that    this    method    needs    to    start    with    test_    in    order    for    nose\n                                to    run    it!'
        if ((os.geteuid() == 0) or (os.getuid() == 0)):
            return meth(self, *args, **kwds)
        else:
            raise SkipTest('This    test    requires    root    privileges.')
    test_inner_onlyroot.root = True
    return test_inner_onlyroot