def is_online(user):
 return (user.lastseen >= time_diff())

def is_online ( user ) : return ( user . lastseen >= time_diff ( ) )
a simple check to see if the user was online within a specified time range .