class_docstr: Classifies a single document into 1 of N categories.
  :param config: A :py:class:`finetune.config.Settings` object or None (for default config).
  :param \**kwargs: key-value pairs of config items to override.
code: def _predict(self, zipped_data, probas=False, **kwargs):
      all_labels = []
      all_probs = []
      doc_probs = []
      for (
          _,
          _,
          start_of_doc,
          end_of_doc,
          _,
          proba,
          _,
          _,
      ) in self.process_long_sequence(zipped_data, **kwargs):
          start, end = 0, None
          doc_probs.append(proba)
  
          if end_of_doc:
              # last chunk in a document
              mean_pool = np.mean(doc_probs, axis=0)
              pred = np.argmax(mean_pool)
              one_hot = np.zeros_like(mean_pool)
              one_hot[pred] = 1
              label = (
                  self.input_pipeline.label_encoder.inverse_transform(
                      [one_hot]
                  )
              )
              label = np.squeeze(label).tolist()
              all_labels.append(label)
              all_probs.append(mean_pool)
              doc_probs = []
  
      if probas:
          return all_probs
      else:
          assert len(all_labels) == len(zipped_data)
          return np.asarray(all_labels)
  
imports: from warnings import warn
  import itertools
  import copy
  import tensorflow
  import tensorflow_addons
  import numpy
  from sklearn.utils import shuffle
  from finetune.base import BaseModel
  from finetune.encoding.target_encoders import OneHotLabelEncoder, NoisyLabelEncoder
  from finetune.nn.target_blocks import classifier
  from finetune.input_pipeline import BasePipeline
  from finetune.model import PredictMode
  from finetune.base_models.gpt.encoder import finetune_to_indico_explain
label_desc: Use image node_id 5 for calling the Classifier obj's underlying member method code with example usage: obj._predict(zipped_data, probas) and returns: all_probs, np