code: def test_logs_custom_task_definition(
      caplog: pytest.LogCaptureFixture,
      sentiment_task: tuple[transformers.Pipeline, TaskDefinition],
  ):
      sentiment, original_task = sentiment_task
      with caplog.at_level(logging.INFO):
          _ = bentoml.transformers.save_model(
              "custom_sentiment_pipeline",
              sentiment,
              task_name=sentiment.task,
              task_definition=original_task,
          )
      assert (
          "Arguments 'task_name' and 'task_definition' are provided. Saving model with pipeline "
          in caplog.text
      )
  
imports: from __future__ import annotations
  import logging
  import os
  import typing
  import pytest
  import transformers
  from transformers.models.auto.modeling_auto import AutoModelForAudioClassification
  from transformers.models.auto.modeling_auto import AutoModelForCausalLM
  from transformers.models.auto.modeling_auto import AutoModelForSequenceClassification
  from transformers.pipelines import check_task
  from transformers.pipelines import pipeline
  from transformers.pipelines.audio_classification import AudioClassificationPipeline
  from transformers.trainer_utils import set_seed
  import bentoml
  from bentoml.exceptions import BentoMLException
  from bentoml.transformers import ModelOptions
label_desc: Use image node_id 7 for calling a global function with example usage: test_logs_custom_task_definition(caplog, sentiment_task) without return types