class_docstr: Fixed-size priority queue keeping the max_size largest items.
docstr: Initialize priority queue.
  
  :param max_size: maximum capacity of priority queue.
docstr_tok: ["Initialize","priority","queue",".",":","param","max_size",":","maximum","capacity","of","priority","queue","."]
code: def __init__(self, max_size):
      """
      Initialize priority queue.
  
      :param max_size: maximum capacity of priority queue.
      """
      self.capacity = max_size
      self.lst = []
  
imports: from typing import Optional
  from parlai.core.params import ParlaiParser
  from parlai.core.opt import Opt
  import math
  from collections.abc import Sequence
  import heapq
  import json
  import parlai.utils.torch
  from parlai.core.agents import Agent
  from parlai.core.dict import DictionaryAgent
  from parlai.utils.io import PathManager
label_desc: Use image node_id 1 to create a new MaxPriorityQueue object from inherited base classes: Sequence with example: obj = MaxPriorityQueue(max_size)