code: def test_init_task_inferred_from_model_name(self, model_info_mock):
      model_info_mock.return_value.pipeline_tag = "text2text-generation"
      generator = HuggingFaceLocalGenerator(model="google/flan-t5-base")
  
      assert generator.huggingface_pipeline_kwargs == {
          "model": "google/flan-t5-base",
          "task": "text2text-generation",
          "token": None,
      }
  
imports: from unittest.mock import patch, Mock
  import pytest
  import torch
  from transformers import PreTrainedTokenizerFast
  from haystack.components.generators.hugging_face_local import HuggingFaceLocalGenerator, StopWordsCriteria
label_desc: Use image node_id 6 for calling the TestHuggingFaceLocalGenerator obj's underlying member method code with example usage: obj.test_init_task_inferred_from_model_name(model_info_mock) without return types