parameters: (self, block)
docstring: For a certain block that is a legal breakpoint, compute the
          best previous breakpoint possible among the linked list of
          candidates.
docstring_summary: For a certain block that is a legal breakpoint, compute the
          best previous breakpoint possible among the linked list of
          candidates.
docstring_tokens: For a certain block that is a legal breakpoint compute the best previous breakpoint possible among the linked list of candidates .
function: def find_best_previous_breakpoints(self, block):
          """For a certain block that is a legal breakpoint, compute the
          best previous breakpoint possible among the linked list of
          candidates."""
          current_last_breakpoint = self.first_candidate
          self.previous_candidate = None
          while current_last_breakpoint:
              # This loop iterates through the candidate breakpoints that could
              # precede the legal breakpoint block
              self.least_demerit_of_class = [float('inf')] * 4
              self.least_demerit = min(self.least_demerit_of_class)
              self.current_line = None
              while current_last_breakpoint and (
                      not self.current_line or
                      current_last_breakpoint.line < self.current_line or
                      self.current_line >= RANK):
                  # This loop iterates through the candidate breakpoints within
                  # the same line (self.current_line) that could precede the
                  # breakpoint (pos: block.position, line: self.current_line + 1)
                  self.next_candidate = current_last_breakpoint.link
                  self.consider_breakpoint(current_last_breakpoint, block)
                  current_last_breakpoint = self.next_candidate
              if self.least_demerit < float('inf'):
                  self.insert_new_candidates(current_last_breakpoint,
                                             block.position)
function_tokens: def find_best_previous_breakpoints ( self , block ) : current_last_breakpoint = self . first_candidate self . previous_candidate = None while current_last_breakpoint : # This loop iterates through the candidate breakpoints that could # precede the legal breakpoint block self . least_demerit_of_class = [ float ( 'inf' ) ] * 4 self . least_demerit = min ( self . least_demerit_of_class ) self . current_line = None while current_last_breakpoint and ( not self . current_line or current_last_breakpoint . line < self . current_line or self . current_line >= RANK ) : # This loop iterates through the candidate breakpoints within # the same line (self.current_line) that could precede the # breakpoint (pos: block.position, line: self.current_line + 1) self . next_candidate = current_last_breakpoint . link self . consider_breakpoint ( current_last_breakpoint , block ) current_last_breakpoint = self . next_candidate if self . least_demerit < float ( 'inf' ) : self . insert_new_candidates ( current_last_breakpoint , block . position )