class_docstr: Produces labels for BROS.
  
  First set of labels is a binary value indicating whether a token is the
  start of a group. Second set of labels is a index indicating what the next
  token in the group is.
class_docstr_tok: ["Produces","labels","for","BROS.","First","set","of","labels","is","a","binary","value","indicating","whether","a","token","is","the","start","of","a","group",".","Second","set","of","labels","is","a","index","indicating","what","the","next","token","in","the","group","is","."]
code: def fit(self, labels):
      # STOP and CONT represent 0 and non-0 next tokens, respectively
      # STOP and CONT only matter when class weights are being used - see
      # BROSPipeline and util.imabalance.class_weight_tensor
      # Note: This means finetune's n_targets count used elsewhere is broken
      self.classes_ = [self.pad_token, "GROUP", "STOP", "CONT"]
      self.lookup = {c: i for i, c in enumerate(self.classes_)}
  
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 2 for calling the BROSEncoder obj's underlying member method code with example usage: obj.fit(labels) without return types