class_docstr: A class containing all functions for auto-regressive text generation, to be used as a mixin in
  [`FlaxPreTrainedModel`].
  
  The class exposes [`~generation.FlaxGenerationMixin.generate`], which can be used for:
          - *greedy decoding* by calling [`~generation.FlaxGenerationMixin._greedy_search`] if `num_beams=1` and
            `do_sample=False`
          - *multinomial sampling* by calling [`~generation.FlaxGenerationMixin._sample`] if `num_beams=1` and
            `do_sample=True`
          - *beam-search decoding* by calling [`~generation.FlaxGenerationMixin._beam_search`] if `num_beams>1` and
            `do_sample=False`
  
  You do not need to call any of the above methods directly. Pass custom parameter values to 'generate' instead. To
  learn more about decoding strategies refer to the [text generation strategies guide](../generation_strategies).
class_docstr_tok: ["A","class","containing","all","functions","for","auto-regressive","text","generation",",","to","be","used","as","a","mixin","in","[","`","FlaxPreTrainedModel","`","]",".","The","class","exposes","[","`","~generation.FlaxGenerationMixin.generate","`","]",",","which","can","be","used","for",":","-","*","greedy","decoding","*","by","calling","[","`","~generation.FlaxGenerationMixin._greedy_search","`","]","if","`","num_beams=1","`","and","`","do_sample=False","`","-","*","multinomial","sampling","*","by","calling","[","`","~generation.FlaxGenerationMixin._sample","`","]","if","`","num_beams=1","`","and","`","do_sample=True","`","-","*","beam-search","decoding","*","by","calling","[","`","~generation.FlaxGenerationMixin._beam_search","`","]","if","`","num_beams",">","1","`","and","`","do_sample=False","`","You","do","not","need","to","call","any","of","the","above","methods","directly",".","Pass","custom","parameter","values","to","'generate","'","instead",".","To","learn","more","about","decoding","strategies","refer","to","the","[","text","generation","strategies","guide","]","(","..","\/generation_strategies",")","."]
code: def _merge_criteria_processor_list(
      self,
      default_list: FlaxLogitsProcessorList,
      custom_list: FlaxLogitsProcessorList,
  ) -> FlaxLogitsProcessorList:
      if len(custom_list) == 0:
          return default_list
      for default in default_list:
          for custom in custom_list:
              if type(custom) is type(default):
                  object_type = "logits processor"
                  raise ValueError(
                      f"A custom {object_type} of type {type(custom)} with values {custom} has been passed to"
                      f" `generate`, but it has already been created with the values {default}. {default} has been"
                      " created by passing the corresponding arguments to generate or by the model's config default"
                      f" values. If you just want to change the default values of {object_type} consider passing"
                      f" them as arguments to `generate` instead of using a custom {object_type}."
                  )
      default_list.extend(custom_list)
      return default_list
  
imports: import copy
  import inspect
  import warnings
  from functools import partial
  from typing import Any, Dict, Optional, Union
  import flax
  import jax
  import jax.numpy
  import numpy
  from jax import lax
  from ..models.auto import FLAX_MODEL_FOR_CAUSAL_LM_MAPPING, FLAX_MODEL_FOR_SEQ_TO_SEQ_CAUSAL_LM_MAPPING, FLAX_MODEL_FOR_VISION_2_SEQ_MAPPING
  from ..utils import ModelOutput, logging
  from .configuration_utils import GenerationConfig
  from .flax_logits_process import FlaxForcedBOSTokenLogitsProcessor, FlaxForcedEOSTokenLogitsProcessor, FlaxForceTokensLogitsProcessor, FlaxLogitsProcessorList, FlaxMinLengthLogitsProcessor, FlaxSuppressTokensAtBeginLogitsProcessor, FlaxSuppressTokensLogitsProcessor, FlaxTemperatureLogitsWarper, FlaxTopKLogitsWarper, FlaxTopPLogitsWarper
label_desc: Use image node_id 13 for calling the FlaxGenerationMixin obj's underlying member method code with example usage: obj._merge_criteria_processor_list(default_list, custom_list) and returns: default_list, default_list