class_docstr: LVIS annotation helper class.
  
  The format of the annations is explained on
  https://www.lvisdataset.org/dataset.
class_docstr_tok: ["LVIS","annotation","helper","class",".","The","format","of","the","annations","is","explained","on","https",":","\/\/www.lvisdataset.org\/dataset","."]
code: def __init__(self, annotation_path):
      with epath.Path(annotation_path).open() as f:
          data = json.load(f)
      self._data = data
  
      img_id2annotations = collections.defaultdict(list)
      for a in self._data.get("annotations", []):
          img_id2annotations[a["image_id"]].append(a)
      self._img_id2annotations = {
          k: list(sorted(v, key=lambda a: a["id"]))
          for k, v in img_id2annotations.items()
      }
  
imports: from __future__ import annotations
  import collections
  import json
  import pathlib
  from etils import epath
  import numpy
  import tensorflow_datasets.public_api
label_desc: Use image node_id 1 to create a new LvisAnnotation object  with example: obj = LvisAnnotation(annotation_path)