code: def test_values_beat(self):
      # test with 2 BeatStateSpaces as before
      # mpss = MultiPatternStateSpace([1, 2], [4, 6])
      bss1 = BeatStateSpace(1, 4)
      bss2 = BeatStateSpace(2, 6)
      mpss = MultiPatternStateSpace([bss1, bss2])
      self.assertTrue(
          np.allclose(mpss.state_spaces[0].intervals, [1, 2, 3, 4])
      )
      self.assertTrue(
          np.allclose(mpss.state_spaces[1].intervals, [2, 3, 4, 5, 6])
      )
      self.assertTrue(mpss.num_states == 30)
      # self.assertTrue(mpss.num_intervals == [4, 5])
      self.assertTrue(mpss.num_patterns == 2)
      # first pattern
      self.assertTrue(
          np.allclose(
              mpss.state_positions[:10],
              [0, 0, 0.5, 0, 1.0 / 3, 2.0 / 3, 0, 0.25, 0.5, 0.75],
          )
      )
      self.assertTrue(
          np.allclose(
              mpss.state_intervals[:10], [1, 2, 2, 3, 3, 3, 4, 4, 4, 4]
          )
      )
      self.assertTrue(np.allclose(mpss.state_patterns[:10], 0))
      # second pattern
      self.assertTrue(
          np.allclose(
              mpss.state_positions[10:],
              [
                  0,
                  0.5,
                  0,
                  1.0 / 3,
                  2.0 / 3,
                  0,
                  0.25,
                  0.5,
                  0.75,
                  0,
                  0.2,
                  0.4,
                  0.6,
                  0.8,
                  0,
                  1.0 / 6,
                  2.0 / 6,
                  0.5,
                  4.0 / 6,
                  5.0 / 6,
              ],
          )
      )
      self.assertTrue(
          np.allclose(
              mpss.state_intervals[10:],
              [
                  2,
                  2,
                  3,
                  3,
                  3,
                  4,
                  4,
                  4,
                  4,
                  5,
                  5,
                  5,
                  5,
                  5,
                  6,
                  6,
                  6,
                  6,
                  6,
                  6,
              ],
          )
      )
      self.assertTrue(np.allclose(mpss.state_patterns[10:], 1))
  
imports: from __future__ import absolute_import, division, print_function
  import unittest
  from madmom.features.beats_hmm import *
label_desc: Use image node_id 2 for calling the TestMultiPatternStateSpaceClass obj's underlying member method code with example usage: obj.test_values_beat() without return types