code: def _text_preprocessing(self, text, clean_caption=False):
      if clean_caption and not is_bs4_available():
          logger.warn(
              BACKENDS_MAPPING["bs4"][-1].format(
                  "Setting `clean_caption=True`"
              )
          )
          logger.warn("Setting `clean_caption` to False...")
          clean_caption = False
  
      if clean_caption and not is_ftfy_available():
          logger.warn(
              BACKENDS_MAPPING["ftfy"][-1].format(
                  "Setting `clean_caption=True`"
              )
          )
          logger.warn("Setting `clean_caption` to False...")
          clean_caption = False
  
      if not isinstance(text, (tuple, list)):
          text = [text]
  
      def process(text: str):
          if clean_caption:
              text = self._clean_caption(text)
              text = self._clean_caption(text)
          else:
              text = text.lower().strip()
          return text
  
      return [process(t) for t in text]
  
imports: import html
  import inspect
  import re
  import urllib.parse
  from typing import Any, Callable, Dict, List, Optional, Union
  import numpy
  import PIL.Image
  import torch
  import torch.nn.functional
  from transformers import CLIPImageProcessor, T5EncoderModel, T5Tokenizer
  from ...loaders import LoraLoaderMixin
  from ...models import UNet2DConditionModel
  from ...schedulers import DDPMScheduler
  from ...utils import BACKENDS_MAPPING, is_accelerate_available, is_bs4_available, is_ftfy_available, logging, replace_example_docstring
  from ...utils.torch_utils import randn_tensor
  from ..pipeline_utils import DiffusionPipeline
  from .pipeline_output import IFPipelineOutput
  from .safety_checker import IFSafetyChecker
  from .watermark import IFWatermarker
label_desc: Use image node_id 3 for calling the IFSuperResolutionPipeline obj's underlying member method code with example usage: obj._text_preprocessing(text, clean_caption) and returns: unknown, text