<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _expect_extra(expected, present, exc_unexpected, exc_missing, exc_args):
 """ Checks for the presence of an extra to the argument list. Raises expections if this is unexpected or if it is missing and expected. """

    if present:
        if not expected:
            raise exc_unexpected(*exc_args)
    elif expected and expected is not Argument.ignore:
        raise exc_missing(*exc_args)