code: def test_torchscript_properties(modelclass):
      """Test that scripted LightningModule has unnecessary methods removed."""
      model = modelclass()
      script = model.to_torchscript()
      assert not hasattr(model, "batch_size") or hasattr(
          script, "batch_size"
      )
      assert not hasattr(model, "learning_rate") or hasattr(
          script, "learning_rate"
      )
      assert not callable(getattr(script, "training_step", None))
  
imports: import os
  import fsspec
  import pytest
  import torch
  from fsspec.implementations.local import LocalFileSystem
  from lightning.fabric.utilities.cloud_io import get_filesystem
  from lightning.pytorch.core.module import LightningModule
  from lightning.pytorch.demos.boring_classes import BoringModel
  from tests_pytorch.helpers.advanced_models import BasicGAN, ParityModuleRNN
  from tests_pytorch.helpers.runif import RunIf
label_desc: Use image node_id 6 for calling a global function with example usage: test_torchscript_properties(modelclass) without return types