code: def test___init__(self):
      # missing `prior` or `prior_shape` and `prior_dtype`
      with pytest.raises(ValueError):
          ContinuousEntropy()
  
      # missing `prior` or `prior_dtype`
      with pytest.raises(ValueError):
          ContinuousEntropy(
              prior_shape=(32,),
          )
  
      # missing `prior` or `prior_shape`
      with pytest.raises(ValueError):
          ContinuousEntropy(
              prior_dtype=torch.int32,
          )
  
      # `prior` (no `prior_shape` and `prior_dtype`)
      continuous_entropy = ContinuousEntropy(
          prior=self.prior,
      )
  
      assert continuous_entropy._prior_shape == self.prior.batch_shape
      assert continuous_entropy._prior_dtype == self.prior_dtype
  
      # `prior` (no `prior_shape` and `prior_dtype`)
      continuous_entropy = ContinuousEntropy(
          prior_shape=self.prior_shape,
          prior_dtype=self.prior_dtype,
      )
  
      assert continuous_entropy._prior_shape == self.prior_shape
      assert continuous_entropy._prior_dtype == self.prior_dtype
  
      # `compressible` is `True`, `cdfs` is provided, but missing `cdf_sizes`
      # and `cdf_offsets`
      with pytest.raises(ValueError):
          ContinuousEntropy(
              compressible=True,
              prior=self.prior,
              cdfs=self.cdfs,
          )
  
      # `compressible` is `True`, `cdf_sizes` is provided, but missing `cdfs`
      # and `cdf_offsets`
      with pytest.raises(ValueError):
          ContinuousEntropy(
              compressible=True,
              prior=self.prior,
              cdf_sizes=self.cdf_sizes,
          )
  
      # `compressible` is `True`, `cdf_offsets` is provided, but missing
      # `cdfs` and `cdf_sizes`
      with pytest.raises(ValueError):
          ContinuousEntropy(
              compressible=True,
              prior=self.prior,
              cdf_offsets=self.cdf_offsets,
          )
  
      # `compressible` is `True`, but missing exactly one of `prior`, `cdfs`,
      # and `maximum_cdf_size`
      with pytest.raises(ValueError):
          ContinuousEntropy(
              compressible=True,
              prior_shape=self.prior_shape,
              prior_dtype=self.prior_dtype,
          )
  
          ContinuousEntropy(
              compressible=True,
              prior=self.prior,
              maximum_cdf_size=16,
          )
  
      # `compressible` is `True` and both `prior_shape` and `prior_dtype` are
      # provided, but `stateless` is `True` and `maximum_cdf_size` is
      # provided
      with pytest.raises(ValueError):
          ContinuousEntropy(
              compressible=True,
              stateless=True,
              prior_shape=self.prior_shape,
              prior_dtype=self.prior_dtype,
              maximum_cdf_size=self.maximum_cdf_size,
          )
  
      # `compressible` is `True`, both `prior_shape` and `prior_dtype` are
      # provided, and `maximum_cdf_size` is provided
      continuous_entropy = ContinuousEntropy(
          compressible=True,
          prior_shape=self.prior_shape,
          prior_dtype=self.prior_dtype,
          maximum_cdf_size=self.maximum_cdf_size,
      )
  
      torch.testing.assert_close(
          continuous_entropy._cdfs, torch.zeros((1, 16)).to(torch.int32)
      )
  
      torch.testing.assert_close(
          continuous_entropy._cdf_sizes,
          torch.zeros((16,)).to(torch.int32),
      )
  
      torch.testing.assert_close(
          continuous_entropy._cdf_offsets,
          torch.zeros((16,)).to(torch.int32),
      )
  
      # `compressible` is `True`, `prior` is provided
      continuous_entropy = ContinuousEntropy(
          compressible=True,
          prior=self.prior,
      )
  
      torch.testing.assert_close(
          continuous_entropy._cdfs.shape,
          Size([16, 6]),
      )
  
      torch.testing.assert_close(
          continuous_entropy._cdf_sizes.shape,
          Size([16]),
      )
  
      torch.testing.assert_close(
          continuous_entropy._cdf_offsets.shape,
          Size([16]),
      )
  
imports: import pytest
  import torch
  import torch.testing
  from torch import Size
  from neuralcompression.distributions import NoisyNormal
  from neuralcompression.layers import ContinuousEntropy
label_desc: Use image node_id 1 for calling the TestContinuousEntropy obj's underlying member method code with example usage: obj.test___init__() without return types