class_docstr: Produces labels for a group relation model.
  
  Labels are of shape [n_groups, seq_len], where each element is a 0 or 1 and
  represents whether a token belongs to a certain group, and where the last
  group represents the pad group
class_docstr_tok: ["Produces","labels","for","a","group","relation","model",".","Labels","are","of","shape","[","n_groups",",","seq_len","]",",","where","each","element","is","a","0","or","1","and","represents","whether","a","token","belongs","to","a","certain","group",",","and","where","the","last","group","represents","the","pad","group"]
code: def __init__(self, pad_token, n_groups):
      self.classes_ = None
      self.lookup = None
      self.pad_token = pad_token
      self.n_groups = n_groups
  
imports: from abc import ABCMeta
  import logging
  import json
  import numpy
  from finetune.encoding.target_encoders import BaseEncoder, Seq2SeqLabelEncoder, SequenceLabelingEncoder
label_desc: Use image node_id 1 to create a new GroupRelationEncoder object from inherited base classes: BROSEncoder with example: obj = GroupRelationEncoder(pad_token, n_groups)