class_docstr: Constructs an OneFormer processor which wraps [`OneFormerImageProcessor`] and
  [`CLIPTokenizer`]/[`CLIPTokenizerFast`] into a single processor that inherits both the image processor and
  tokenizer functionalities.
  
  Args:
      image_processor ([`OneFormerImageProcessor`]):
          The image processor is a required input.
      tokenizer ([`CLIPTokenizer`, `CLIPTokenizerFast`]):
          The tokenizer is a required input.
      max_seq_len (`int`, *optional*, defaults to 77)):
          Sequence length for input text list.
      task_seq_len (`int`, *optional*, defaults to 77):
          Sequence length for input task token.
code: def _preprocess_text(self, text_list=None, max_length=77):
      if text_list is None:
          raise ValueError("tokens cannot be None.")
  
      tokens = self.tokenizer(
          text_list,
          padding="max_length",
          max_length=max_length,
          truncation=True,
      )
  
      attention_masks, input_ids = (
          tokens["attention_mask"],
          tokens["input_ids"],
      )
  
      token_inputs = []
      for attn_mask, input_id in zip(attention_masks, input_ids):
          token = torch.tensor(attn_mask) * torch.tensor(input_id)
          token_inputs.append(token.unsqueeze(0))
  
      token_inputs = torch.cat(token_inputs, dim=0)
      return token_inputs
  
file_path: transformers/src/transformers/models/oneformer/processing_oneformer.py
imports: from typing import List
  from ...processing_utils import ProcessorMixin
  from ...utils import is_torch_available
label_desc: Use image node_id 2 for calling the OneFormerProcessor obj's underlying member method code with example usage: obj._preprocess_text(text_list, max_length) and returns: token_inputs