class_docstr: Dummy component for sparse regression with a spike-and-slab prior.
code: def __init__(
      self,
      design_matrix,
      weights_prior,
      sparse_weights_nonzero_prob=0.5,
      name=None,
  ):
      # Extract precision matrix from a multivariate normal prior.
      weights_prior_precision = None
      if hasattr(weights_prior, "precision"):
          if isinstance(
              weights_prior.precision, tf.linalg.LinearOperator
          ):
              weights_prior_precision = (
                  weights_prior.precision.to_dense()
              )
          else:
              weights_prior_precision = weights_prior.precision()
      elif weights_prior is not None:
          inverse_scale = weights_prior.scale.inverse()
          weights_prior_precision = inverse_scale.matmul(
              inverse_scale, adjoint=True
          ).to_dense()
      self._weights_prior_precision = weights_prior_precision
      self._sparse_weights_nonzero_prob = sparse_weights_nonzero_prob
      super().__init__(
          design_matrix=design_matrix,
          weights_prior=DummySpikeAndSlabPrior(
              dtype=dtype_util.common_dtype([design_matrix])
          ),
          name=name,
      )
  
imports: import collections
  import itertools
  import numpy
  import six
  import tensorflow.compat.v2
  from tensorflow_probability.python.bijectors import identity
  from tensorflow_probability.python.bijectors import invert
  from tensorflow_probability.python.bijectors import square
  from tensorflow_probability.python.distributions import categorical
  from tensorflow_probability.python.distributions import distribution
  from tensorflow_probability.python.distributions import gamma
  from tensorflow_probability.python.distributions import inverse_gamma
  from tensorflow_probability.python.distributions import mixture_same_family
  from tensorflow_probability.python.distributions import mvn_diag
  from tensorflow_probability.python.distributions import mvn_linear_operator
  from tensorflow_probability.python.distributions import normal
  from tensorflow_probability.python.distributions import normal_conjugate_posteriors
  from tensorflow_probability.python.distributions import transformed_distribution
  from tensorflow_probability.python.experimental.distributions import mvn_precision_factor_linop
  from tensorflow_probability.python.experimental.sts_gibbs import dynamic_spike_and_slab
  from tensorflow_probability.python.experimental.sts_gibbs import sample_parameters
  from tensorflow_probability.python.experimental.sts_gibbs import spike_and_slab
  from tensorflow_probability.python.internal import distribution_util
  from tensorflow_probability.python.internal import dtype_util
  from tensorflow_probability.python.internal import prefer_static
  from tensorflow_probability.python.internal import reparameterization
  from tensorflow_probability.python.internal import samplers
  from tensorflow_probability.python.sts.components import local_level
  from tensorflow_probability.python.sts.components import local_linear_trend
  from tensorflow_probability.python.sts.components import regression
  from tensorflow_probability.python.sts.components import seasonal
  from tensorflow_probability.python.sts.components import sum
  from tensorflow_probability.python.sts.internal import util
label_desc: Use image node_id 1 to create a new SpikeAndSlabSparseLinearRegression object from inherited base classes: regression with example: obj = SpikeAndSlabSparseLinearRegression(design_matrix, weights_prior, sparse_weights_nonzero_prob, name)