class_docstr: Exteded Trainer for FLash tasks.
  
  >>> Trainer()  # doctest: +ELLIPSIS
  <...trainer.Trainer object at ...>
class_docstr_tok: ["Exteded","Trainer","for","FLash","tasks",".",">",">",">","Trainer","(",")","#","doctest",":","+ELLIPSIS","<","...","trainer.Trainer","object","at","...",">"]
docstr: This function is used to select the `BaseFinetuning` to be used for finetuning.
docstr_tok: ["This","function","is","used","to","select","the","`","BaseFinetuning","`","to","be","used","for","finetuning","."]
code: def _resolve_callbacks(
      self,
      model: Task,
      strategy: Union[
          str,
          BaseFinetuning,
          Tuple[str, int],
          Tuple[str, Tuple[int, int]],
      ] = "no_freeze",
      train_bn: bool = True,
  ):
      """This function is used to select the `BaseFinetuning` to be used for finetuning."""
      if isinstance(strategy, str) and strategy == "no_freeze":
          warnings.warn(
              "The model contains a default finetune callback.",
              UserWarning,
          )
      finetuning_callback = model.configure_finetune_callback(
          strategy=strategy, train_bn=train_bn
      )
      if len(finetuning_callback) > 1:
          raise ValueError(
              "Create a list with only 1 finetuning callback."
          )
      self.callbacks = self._merge_callbacks(
          self.callbacks, finetuning_callback
      )
  
imports: import inspect
  import warnings
  from argparse import ArgumentParser, Namespace
  from functools import wraps
  from typing import Callable, List, Optional, Tuple, Union
  import torch
  from pytorch_lightning import LightningDataModule, LightningModule
  from pytorch_lightning import Trainer
  from pytorch_lightning.accelerators.tpu import TPUAccelerator
  from pytorch_lightning.callbacks import BaseFinetuning
  from pytorch_lightning.utilities.argparse import add_argparse_args, get_init_arguments_and_types, parse_env_variables
  from torch.utils.data import DataLoader
  import flash
  from flash.core.data.io.output import Output
  from flash.core.data.io.output_transform import OutputTransform
  from flash.core.data.io.transform_predictions import TransformPredictions
  from flash.core.model import Task
  from flash.core.registry import FlashRegistry
label_desc: Use image node_id 5 for calling the Trainer obj's underlying member method code with example usage: obj._resolve_callbacks(model, strategy, train_bn) without return types