class_docstr: Bag-level relation extraction dataset. Note that relation of NA should be named as 'NA'.
code: def collate_bag_size_fn(data):
      data = list(zip(*data))
      label, bag_name, count = data[:3]
      seqs = data[3:]
      for i in range(len(seqs)):
          seqs[i] = torch.stack(seqs[i], 0)  # (batch, bag, L)
      scope = []  # (B, 2)
      start = 0
      for c in count:
          scope.append((start, start + c))
          start += c
      label = torch.tensor(label).long()  # (B)
      return [label, bag_name, scope] + seqs
  
imports: import torch
  import torch.utils.data
  import os, random, json, logging
  import numpy
  import sklearn.metrics
label_desc: Use image node_id 5 for calling the BagREDataset obj's underlying member method code with example usage: obj.collate_bag_size_fn(data) and returns: unknown