<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def last_datetime(self):
 """Return the time of the last operation on the bundle as a datetime object"""

        from datetime import datetime

        try:
            return datetime.fromtimestamp(self.state.lasttime)
        except TypeError:
            return None