def _sample_parameter(self):
    if (self.force_mag_set is not None):
        set_index = self.np_random.randint(len(self.force_mag_set))
        self.force_mag = self.np_random.uniform(self.force_mag_set[set_index][0], self.force_mag_set[set_index][1])
    if (self.length_set is not None):
        set_index = self.np_random.randint(len(self.length_set))
        self.length = self.np_random.uniform(self.length_set[set_index][0], self.length_set[set_index][1])
    if (self.masspole_set is not None):
        set_index = self.np_random.randint(len(self.masspole_set))
        self.masspole = self.np_random.uniform(self.masspole_set[set_index][0], self.masspole_set[set_index][1])
    self.polemass_length = (self.masspole * self.length)
    self.total_mass = (self.masspole + self.masscart)
def _sample_parameter(self):
    if (self.force_mag_set is not None):
        set_index = self.np_random.randint(len(self.force_mag_set))
        self.force_mag = self.np_random.uniform(self.force_mag_set[set_index][0], self.force_mag_set[set_index][1])
    if (self.length_set is not None):
        set_index = self.np_random.randint(len(self.length_set))
        self.length = self.np_random.uniform(self.length_set[set_index][0], self.length_set[set_index][1])
    if (self.masspole_set is not None):
        set_index = self.np_random.randint(len(self.masspole_set))
        self.masspole = self.np_random.uniform(self.masspole_set[set_index][0], self.masspole_set[set_index][1])
    self.polemass_length = (self.masspole * self.length)
    self.total_mass = (self.masspole + self.masscart)