docs: def load(fin, dtype=np.float32, max_vocab=None):
      """
      Refer to :func:`word_embedding_loader.loader.glove.load` for the API.
      """
      vocab = {}
      line = next(fin)
      data = line.strip().split(b' ')
      assert len(data) == 2
      words = int(data[0])
      if max_vocab is not None:
          words = min(max_vocab, words)
      size = int(data[1])
      arr = np.empty((words, size), dtype=dtype)
      i = 0
      for n_line, line in enumerate(fin):
          if i >= words:
              break
          token, v = _load_line(line, dtype, size)
          if token in vocab:
              parse_warn(b'Duplicated vocabulary ' + token)
              continue
          arr[i, :] = v
          vocab[token] = i
          i += 1
      if i != words:
          # Use + instead of formatting because python 3.4.* does not allow
          # format with bytes
          parse_warn(
              b'EOF before the defined size (read ' + bytes(i) + b', expected '
              + bytes(words) + b')'
          )
          arr = arr[:i, :]
      return arr, vocab