<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _get_context(argspec, kwargs):
 """Prepare a context for the serialization. :param argspec: The argspec of the serialization function. :param kwargs: Dict with context :return: Keywords arguments that function can accept. """

    if argspec.keywords is not None:
        return kwargs
    return dict((arg, kwargs[arg]) for arg in argspec.args if arg in kwargs)