class_docstr: A label encoder that supports specifying a positive class on top of sklearn's LabelEncoder.
class_docstr_tok: ["A","label","encoder","that","supports","specifying","a","positive","class","on","top","of","sklearn","'s","LabelEncoder","."]
docstr: Fit label encoder.
  
  Parameters
  ----------
  y : array-like of shape (n_samples,)
      Target values.
  
  Returns
  -------
  self : returns an instance of self.
      Fitted label encoder.
docstr_tok: ["Fit","label","encoder",".","Parameters","--","--","--","--","--","y",":","array-like","of","shape","(","n_samples",",",")","Target","values",".","Returns","--","--","--","-","self",":","returns","an","instance","of","self",".","Fitted","label","encoder","."]
code: def fit(self, y):
      """
      Fit label encoder.
  
      Parameters
      ----------
      y : array-like of shape (n_samples,)
          Target values.
  
      Returns
      -------
      self : returns an instance of self.
          Fitted label encoder.
      """
      self._le.fit(y)
      self._set_attributes()
  
      return self
  
imports: import json
  import logging
  import re
  from typing import Any, Dict, List, Optional, Union
  import jsonschema
  import numpy
  import pandas
  from omegaconf import DictConfig, OmegaConf
  from sklearn.preprocessing import LabelEncoder
  from ..constants import AUTOMM, END_OFFSET, ENTITY_GROUP, NER_ANNOTATION, PROBABILITY, START_OFFSET
label_desc: Use image node_id 3 for calling the CustomLabelEncoder obj's underlying member method code with example usage: obj.fit(y) and returns: self