hunk.code_window:                 break
           if key_to_delete:
               del self.call_response[key_to_delete]
           return return_string.encode()
  
hunk.labels: keep replace replace keep keep keep
hunk.after_edit:         if key_to_shrink:
               self.call_response[key_to_shrink] = self.call_response[
                   key_to_shrink][1:]
               if len(self.call_response[key_to_shrink]) == 0:
                   del self.call_response[key_to_shrink]
  
hunk.file_path: python/ray/tests/test_autoscaler.py
hunk.type: replace
file: class Record:
      """Data record in data stream"""
  
      def __init__(self, value):
          self.value = value
          self.stream = None
  
      def __repr__(self):
          return "Record(%s)".format(self.value)
  
      def __eq__(self, other):
          if type(self) is type(other):
              return (self.stream, self.value) == (other.stream, other.value)
          return False
  
      def __hash__(self):
          return hash((self.stream, self.value))
  
  
  class KeyRecord(Record):
      """Data record in a keyed data stream"""
  
      def __init__(self, key, value):
          super().__init__(value)
          self.key = key
  
      def __eq__(self, other):
          if type(self) is type(other):
              return (self.stream, self.key, self.value) ==\
                     (other.stream, other.key, other.value)
          return False
  
      def __hash__(self):
          return hash((self.stream, self.key, self.value))
  