code: def gen_custom_pipeline_kwargs(
      task_name: str | None = None,
      /,
      *,
      pt_model_auto: str = "AutoModelForSequenceClassification",
      tf_model_auto: str = "TFAutoModelForSequenceClassification",
      model_name: str = TINY_TEXT_MODEL,
      task_type: str = "text",
  ) -> tuple[str, TaskDefinition]:
      if task_name is None:
          task_name = get_task(model_name)
      return task_name, TaskDefinition(
          impl=PairClassificationPipeline,
          tf=convert_to_autoclass(tf_model_auto)
          if is_tf_available()
          else None,
          pt=convert_to_autoclass(pt_model_auto)
          if is_torch_available()
          else None,
          default=SimpleDefaultMapping(pt=(model_name,)),
          type=task_type,
      )
  
imports: from __future__ import annotations
  import importlib
  import typing
  import numpy
  import requests
  import tensorflow
  import transformers
  from datasets import load_dataset
  from PIL import Image
  from transformers import Pipeline
  from transformers.pipelines import get_supported_tasks
  from transformers.pipelines import get_task
  from transformers.testing_utils import nested_simplify
  from transformers.trainer_utils import set_seed
  from transformers.utils import is_tf_available
  from transformers.utils import is_torch_available
  import bentoml
  from bentoml._internal.frameworks.transformers import SimpleDefaultMapping
  from bentoml._internal.frameworks.transformers import TaskDefinition
  from bentoml._internal.frameworks.transformers import convert_to_autoclass
  from bentoml._internal.frameworks.transformers import delete_pipeline
  from bentoml._internal.frameworks.transformers import register_pipeline
  from .None import FrameworkTestModel
  from .None import FrameworkTestModelConfiguration
  from .None import FrameworkTestModelInput
label_desc: Use image node_id 4 for calling a global function with example usage: gen_custom_pipeline_kwargs() and returns: task_name,  TaskDefinition