class_docstr: Produces encoded labels for a BIO tagging based grouping formulation.
class_docstr_tok: ["Produces","encoded","labels","for","a","BIO","tagging","based","grouping","formulation","."]
code: def fit(self, labels):
      labels, groups = list(zip(*labels))
      super().fit(labels)
  
      # Add BG- and IG- version of labels
      n_classes = []
      for c in self.classes_:
          # Retain original label for entities outside of groups
          # (Equivalent to Outside (O) prefix)
          n_classes.append(c)
          n_classes.append("BG-" + c)
          n_classes.append("IG-" + c)
      self.classes_ = n_classes
      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 GroupSequenceLabelingEncoder obj's underlying member method code with example usage: obj.fit(labels) without return types