code: def test_freeze_bottleneck():
      model = HiFiCAutoencoder()
  
      model.freeze_bottleneck()
  
      for module in [
          model.hyper_bottleneck,
          model.hyper_synthesis_mean,
          model.hyper_synthesis_scale,
          model.hyper_analysis,
          model.latent_bottleneck,
      ]:
          for p in module.parameters():
              assert p.requires_grad is False
  
      model.train()
  
      for module in [
          model.hyper_bottleneck,
          model.hyper_synthesis_mean,
          model.hyper_synthesis_scale,
          model.hyper_analysis,
          model.latent_bottleneck,
      ]:
          for p in module.parameters():
              assert p.requires_grad is False
  
file_path: NeuralCompression/tests/models/test_hific_autoencoder.py
imports: import pytest
  import torch
  from torch import Tensor
  from neuralcompression.models import HiFiCAutoencoder
label_desc: Use image node_id 6 for calling a global function with example usage: test_freeze_bottleneck() without return types