code: def test_freeze_encoder():
      model = HiFiCAutoencoder()
  
      model.freeze_encoder()
  
      for p in model.encoder.parameters():
          assert p.requires_grad is False
  
      model.train()
  
      for p in model.encoder.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 5 for calling a global function with example usage: test_freeze_encoder() without return types