code: def weights_sparse_gauss(
      n_weights: int = 100,
      nnz: int = 10,
      std: float = 1.0,
      dtype="float64",
  ) -> np.ndarray:
      """Sparse and gaussian model weights generator
      Instance of weights for a model, given by a sparse vector,
      where non-zero coordinates (chosen at random) are centered Gaussian
      with given standard-deviation
  
      Parameters
      ----------
      n_weights : `int`, default=100
          Number of weights
  
      nnz : `int`, default=10
          Number of non-zero weights
  
      std : `float`, default=1.
          Standard deviation of the Gaussian non-zero entries
  
      dtype : `{'float64', 'float32'}`, default='float64'
          Type of the arrays used.
  
      Returns
      -------
      output : `numpy.ndarray`, shape=(n_weights,)
          The weights vector
      """
      if nnz >= n_weights:
          warn(
              (
                  "nnz must be smaller than n_weights "
                  "using nnz=n_weights instead"
              )
          )
          nnz = n_weights
      weights0 = np.zeros(n_weights, dtype=dtype)
      idx = np.arange(n_weights)
      np.random.shuffle(idx)
      weights0[idx[:nnz]] = np.random.randn(nnz)
      weights0 *= std
      return weights0
  
imports: from warnings import warn
  import numpy
label_desc: Use image node_id 1 for calling a global function with example usage: weights_sparse_gauss(n_weights, nnz, std, dtype) and returns: weights0