code: def test_pruning_callback(
      tmpdir,
      use_global_unstructured: bool,
      parameters_to_prune: bool,
      pruning_fn: Union[str, pytorch_prune.BasePruningMethod],
      use_lottery_ticket_hypothesis: bool,
  ):
      train_with_pruning_callback(
          tmpdir,
          parameters_to_prune=parameters_to_prune,
          use_global_unstructured=use_global_unstructured,
          pruning_fn=pruning_fn,
          use_lottery_ticket_hypothesis=use_lottery_ticket_hypothesis,
      )
  
imports: import re
  from collections import OrderedDict
  from logging import INFO
  from typing import Union
  import pytest
  import torch
  import torch.nn.utils.prune
  from lightning.pytorch import Trainer, seed_everything
  from lightning.pytorch.callbacks import ModelCheckpoint, ModelPruning
  from lightning.pytorch.demos.boring_classes import BoringModel
  from lightning.pytorch.utilities.exceptions import MisconfigurationException
  from torch import nn
  from torch.nn import Sequential
  from tests_pytorch.helpers.runif import RunIf
label_desc: Use image node_id 3 for calling a global function with example usage: test_pruning_callback(tmpdir, use_global_unstructured, parameters_to_prune, pruning_fn, use_lottery_ticket_hypothesis) without return types