code: def test_finetuning(
      tmpdir, strategy, lr_scheduler, checker_class, checker_class_data
  ):
      task = TestTaskWithFinetuning(
          loss_fn=F.nll_loss,
          lr_scheduler=lr_scheduler,
          optimizer="sgd",
          learning_rate=0.1,
      )
      callbacks = (
          []
          if checker_class is None
          else checker_class(dirpath=tmpdir, **checker_class_data)
      )
      trainer = flash.Trainer(
          max_epochs=5, limit_train_batches=10, callbacks=callbacks
      )
      ds = DummyDataset()
      trainer.finetune(
          task, train_dataloader=DataLoader(ds), strategy=strategy
      )
  
imports: from numbers import Number
  from typing import Iterable, List, Optional, Tuple, Union
  import flash
  import pytest
  import pytorch_lightning
  import torch
  from flash.core.finetuning import _FINETUNING_STRATEGIES_REGISTRY
  from flash.core.model import Task
  from flash.core.utilities.imports import _DEEPSPEED_AVAILABLE, _TOPIC_CORE_AVAILABLE
  from pytorch_lightning.callbacks.model_checkpoint import ModelCheckpoint
  from torch import Tensor
  from torch.nn import Flatten, Linear, LogSoftmax, Module
  from torch.nn import functional
  from torch.utils.data import DataLoader
  from tests.helpers.boring_model import BoringModel
label_desc: Use image node_id 2 for calling a global function with example usage: test_finetuning(tmpdir, strategy, lr_scheduler, checker_class, checker_class_data) without return types