code: def _load_history_from_file(path, size=-1):
          
          if size == 0:
              return []
          if os.path.exists(path):
              with codecs.open(path, 'r', encoding='utf-8') as histfile:
                  lines = [line.rstrip('\n') for line in histfile]
              if size > 0:
                  lines = lines[-size:]
              return lines
          else:
              return []
docs: Load a history list from a file and split it into lines.
  
          :param path: the path to the file that should be loaded
          :type path: str
          :param size: the number of lines to load (0 means no lines, < 0 means
              all lines)
          :type size: int
          :returns: a list of history items (the lines of the file)
          :rtype: list(str)