docs: def _pick_best_fit(self, content):
          """This method return the smallest possible QR code version number
          that will fit the specified data with the given error level.
          """
          import math
          
          for version in range(1, 41):
              #Get the maximum possible capacity
              capacity = tables.data_capacity[version][self.error][self.mode_num]
              
              #Check the capacity
              #Kanji's count in the table is "characters" which are two bytes
              if (self.mode_num == tables.modes['kanji'] and
                  capacity >= math.ceil(len(content) / 2)):
                  return version
              if capacity >= len(content):
                  return version
  
          raise ValueError('The data will not fit in any QR code version '
                           'with the given encoding and error level.')