<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def set_walltime(self, walltime):
 """ Setting a walltime for the job :param walltime: Walltime of the job (an instance of timedelta) :returns: self :rtype: self """

        if not isinstance(walltime, timedelta):
            raise TypeError(
                'walltime must be an instance of datetime.timedelta. %s given' %
                type(walltime)
            )

        self._options['walltime'] = walltime
        return self