def sample_parameters_given_hyper(self, gen_seed=0):
        """
        Samples a Gaussian parameter given the current hyperparameters.
        Inputs:
            gen_seed: integer used to seed the rng
        """
        if type(gen_seed) is not int:
            raise TypeError("gen_seed should be an int")

        nprng = numpy.random.RandomState(gen_seed)

        hypers = self.get_hypers()
        a = hypers['a']
        b = hypers['b']
        kappa = hypers['kappa']

        mu = nprng.vonmises(b-math.pi, a)+math.pi
        kappa = hypers['kappa']

        assert(kappa > 0)
        assert(mu >= 0 and mu <= 2*pi)

        params = {'mu': mu, 'kappa': kappa}

        return params
dataset/ETHPy150Open probcomp/crosscat/src/tests/component_model_extensions/CyclicComponentModel.py/p_CyclicComponentModel.sample_parameters_given_hyper/original