code: def hit_expire(self, all_hits, hit_ids=None):
          ''' Expire all HITs. '''
          if all_hits:
              hits_data = self.get_active_hits()
              hit_ids = [hit.options['hitid'] for hit in hits_data]
          for hit in hit_ids:
              success = self.amt_services.expire_hit(hit)
              if success:
                  if self.sandbox:
                      print "expiring sandbox HIT", hit
                  else:
                      print "expiring live HIT", hif hit_expire(self, all_hits, hit_ids=None):
          ''' Expire all HITs. '''
          if all_hits:
              hits_data = self.get_active_hits()
              hit_ids = [hit.options['hitid'] for hit in hits_data]
          for hit in hit_ids:
              success = self.amt_services.expire_hit(hit)
              if success:
                  if self.sandbox:
                      print "expiring sandbox HIT", hit
                  else:
                      print "expiring live HIT", hit
docs: Expire all HITs.