<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def arguments(function, extra_arguments=0):
 """Returns the name of all arguments a function takes"""

    if not hasattr(function, '__code__'):
        return ()

    return function.__code__.co_varnames[:function.__code__.co_argcount + extra_arguments]