class_docstr: This is a mixin used to provide saving/loading functionality for all processor classes.
class_docstr_tok: ["This","is","a","mixin","used","to","provide","saving\/loading","functionality","for","all","processor","classes","."]
docstr: Register this class with a given auto class. This should only be used for custom feature extractors as the ones
  in the library are already mapped with `AutoProcessor`.
  
  <Tip warning={true}>
  
  This API is experimental and may have some slight breaking changes in the next releases.
  
  </Tip>
  
  Args:
      auto_class (`str` or `type`, *optional*, defaults to `"AutoProcessor"`):
          The auto class to register this new feature extractor with.
docstr_tok: ["Register","this","class","with","a","given","auto","class",".","This","should","only","be","used","for","custom","feature","extractors","as","the","ones","in","the","library","are","already","mapped","with","`","AutoProcessor","`",".","<","Tip","warning=","{","true","}",">","This","API","is","experimental","and","may","have","some","slight","breaking","changes","in","the","next","releases",".","<","\/Tip",">","Args",":","auto_class","(","`","str","`","or","`","type","`",",","*","optional","*",",","defaults","to","`","``","AutoProcessor","''","`",")",":","The","auto","class","to","register","this","new","feature","extractor","with","."]
code: def register_for_auto_class(cls, auto_class="AutoProcessor"):
      """
      Register this class with a given auto class. This should only be used for custom feature extractors as the ones
      in the library are already mapped with `AutoProcessor`.
  
      <Tip warning={true}>
  
      This API is experimental and may have some slight breaking changes in the next releases.
  
      </Tip>
  
      Args:
          auto_class (`str` or `type`, *optional*, defaults to `"AutoProcessor"`):
              The auto class to register this new feature extractor with.
      """
      if not isinstance(auto_class, str):
          auto_class = auto_class.__name__
  
      import transformers.models.auto as auto_module
  
      if not hasattr(auto_module, auto_class):
          raise ValueError(f"{auto_class} is not a valid auto class.")
  
      cls._auto_class = auto_class
  
file_path: H2O/h2o_flexgen/benchmark/third_party/transformers/src/transformers/processing_utils.py
imports: import importlib.util
  import os
  from pathlib import Path
  from .dynamic_module_utils import custom_object_save
  from .tokenization_utils_base import PreTrainedTokenizerBase
  from .utils import PushToHubMixin, copy_func, logging
label_desc: Use image node_id 5 for calling the ProcessorMixin obj's underlying member method code with example usage: obj.register_for_auto_class(cls, auto_class) without return types