code: def test_choice_in_lightning():
      @nni.trace
      class AnyModule(LightningModule):
          pass
  
      evaluator = Lightning(
          AnyModule(), Trainer(max_epochs=Categorical([1, 2, 3]))
      )
      assert len(evaluator.simplify()) == 1
      label = list(evaluator.simplify())[0]
      evaluator1 = evaluator.freeze({label: 2})
      assert evaluator1.get().trainer.max_epochs in [1, 2, 3]
  
      for target, evaluator1 in enumerate(evaluator.grid(), start=1):
          assert evaluator1.get().trainer.max_epochs == target
  
imports: import re
  import sys
  import pytest
  import nni
  import nni.trial
  import torch
  import pytorch_lightning
  from nni.mutable import Categorical, Numerical, SampleValidationError
  from nni.mutable.mutable import _mutable_equal
  from nni.nas.evaluator import FunctionalEvaluator
  from nni.nas.evaluator.pytorch import Classification, Lightning, DataLoader, Trainer, LightningModule
  from nni.nas.evaluator.evaluator import FrozenEvaluator
  from torch import nn
  from torch.utils.data import TensorDataset
label_desc: Use image node_id 9 for calling a global function with example usage: test_choice_in_lightning() without return types