nodes: 0, module; 1, function_definition; 2, function_name:get; 3, parameters; 4, block; 5, identifier:self; 6, identifier:now; 7, expression_statement; 8, with_statement; 9, comment:"""
          Get a bucket key to compact.  If none are available, returns
          None.  This uses a configured lock to ensure that the bucket
          key is popped off the sorted set in an atomic fashion.
  
          :param now: The current time, as a float.  Used to ensure the
                      bucket key has been aged sufficiently to be
                      quiescent.
  
          :returns: A bucket key ready for compaction, or None if no
                    bucket keys are available or none have aged
                    sufficiently.
          """; 10, with_clause; 11, block; 12, with_item; 13, expression_statement; 14, comment:# Did we get any items?; 15, if_statement; 16, comment:# Drop the item we got; 17, expression_statement; 18, expression_statement; 19, return_statement; 20, attribute; 21, assignment; 22, not_operator; 23, block; 24, assignment; 25, call; 26, identifier:item; 27, identifier:self; 28, identifier:lock; 29, identifier:items; 30, call; 31, identifier:items; 32, return_statement; 33, identifier:item; 34, subscript; 35, attribute; 36, argument_list; 37, attribute; 38, argument_list; 39, None; 40, identifier:items; 41, integer:0; 42, attribute; 43, identifier:zrem; 44, identifier:item; 45, attribute; 46, identifier:zrangebyscore; 47, attribute; 48, integer:0; 49, binary_operator:now - self.min_age; 50, keyword_argument; 51, keyword_argument; 52, identifier:self; 53, identifier:db; 54, identifier:self; 55, identifier:db; 56, identifier:self; 57, identifier:key; 58, identifier:now; 59, attribute; 60, identifier:start; 61, integer:0; 62, identifier:num; 63, integer:1; 64, identifier:self; 65, identifier:min_age
code: def get(self, now):
          """
          Get a bucket key to compact.  If none are available, returns
          None.  This uses a configured lock to ensure that the bucket
          key is popped off the sorted set in an atomic fashion.
  
          :param now: The current time, as a float.  Used to ensure the
                      bucket key has been aged sufficiently to be
                      quiescent.
  
          :returns: A bucket key ready for compaction, or None if no
                    bucket keys are available or none have aged
                    sufficiently.
          """
  
          with self.lock:
              items = self.db.zrangebyscore(self.key, 0, now - self.min_age,
                                            start=0, num=1)
              # Did we get any items?
              if not items:
                  return None
  
              # Drop the item we got
              item = items[0]
              self.db.zrem(item)
  
              return item