code: def check_targets(self, targets):
      # type: (Optional[List[Dict[str, Tensor]]]) -> None
      assert targets is not None
      assert all(["boxes" in t for t in targets])
      assert all(["labels" in t for t in targets])
  
imports: from typing import Optional, List, Dict, Tuple
  import torch
  from torch import Tensor
  import torch.nn.functional
  from torchvision.ops import roi_align
  from .None import det_utils
  from .None import boxes
label_desc: Use image node_id 6 for calling the RoIHeads obj's underlying member method code with example usage: obj.check_targets(targets) without return types