docs: def _select_position(self, width, height):
          """
          Search for the placement with the bes fitness for the rectangle.
  
          Returns:
              tuple (Rectangle, fitness) - Rectangle placed in the fittest position
              None - Rectangle couldn't be placed
          """
          positions = self._generate_placements(width, height)
          if self.rot and width != height:
              positions += self._generate_placements(height, width)
          if not positions:
              return None, None
          return min(((p[0], self._rect_fitness(*p))for p in positions), 
                  key=operator.itemgetter(1))