code: def test_values_bar(self):
      # test with 2 BarStateSpaces
      bss1 = BarStateSpace(2, 1, 4)
      bss2 = BarStateSpace(1, 2, 6)
      btm1 = BarTransitionModel(bss1, 100)
      btm2 = BarTransitionModel(bss2, 100)
      tm = MultiPatternTransitionModel([btm1, btm2])
      self.assertTrue(tm.num_states == 20 + 20)
      self.assertTrue(tm.num_transitions == 26 + 28)
      # the first pattern has 26 transitions
      self.assertTrue(
          np.allclose(
              tm.states[:26],
              [
                  10,
                  12,
                  15,
                  1,
                  15,
                  19,
                  3,
                  4,
                  15,
                  19,
                  6,
                  7,
                  8,
                  0,
                  2,
                  5,
                  11,
                  5,
                  9,
                  13,
                  14,
                  5,
                  9,
                  16,
                  17,
                  18,
              ],
          )
      )
      # the second 28
      self.assertTrue(
          np.allclose(
              tm.states[26:],
              [
                  21,
                  24,
                  20,
                  24,
                  28,
                  22,
                  23,
                  24,
                  28,
                  33,
                  39,
                  25,
                  26,
                  27,
                  28,
                  33,
                  39,
                  29,
                  30,
                  31,
                  32,
                  33,
                  39,
                  34,
                  35,
                  36,
                  37,
                  38,
              ],
          )
      )
      # the first pattern has 20 states (pointers has one more element)
      self.assertTrue(
          np.allclose(
              tm.pointers[:21],
              [
                  0,
                  1,
                  3,
                  4,
                  6,
                  7,
                  8,
                  10,
                  11,
                  12,
                  13,
                  14,
                  16,
                  17,
                  19,
                  20,
                  21,
                  23,
                  24,
                  25,
                  26,
              ],
          )
      )
      # the second has 20
      self.assertTrue(
          np.allclose(
              tm.pointers[21:],
              [
                  28,
                  29,
                  31,
                  32,
                  33,
                  37,
                  38,
                  39,
                  40,
                  43,
                  44,
                  45,
                  46,
                  47,
                  49,
                  50,
                  51,
                  52,
                  53,
                  54,
              ],
          )
      )
      # transition probabilities
      self.assertTrue(
          np.allclose(
              tm.probabilities,
              [
                  1,
                  1,
                  0,
                  1,
                  1,
                  0,
                  1,
                  1,
                  0,
                  1,
                  1,
                  1,
                  1,
                  1,
                  1,
                  0,
                  1,
                  1,
                  0,
                  1,
                  1,
                  0,
                  1,
                  1,
                  1,
                  1,
                  1,
                  0,
                  1,
                  1,
                  0,
                  1,
                  1,
                  0,
                  1,
                  0,
                  0,
                  1,
                  1,
                  1,
                  0,
                  1,
                  0,
                  1,
                  1,
                  1,
                  1,
                  0,
                  1,
                  1,
                  1,
                  1,
                  1,
                  1,
              ],
              atol=1e-7,
          )
      )
      self.assertTrue(
          np.allclose(
              tm.log_probabilities,
              [
                  0,
                  0,
                  -33.33333,
                  0,
                  0,
                  -25,
                  0,
                  0,
                  -33.33333,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  -33.33333,
                  0,
                  0,
                  -25,
                  0,
                  0,
                  -33.33333,
                  0,
                  0,
                  0,
                  0,
                  0,
                  -33.33333,
                  0,
                  0,
                  -25,
                  0,
                  0,
                  -33.33333,
                  0,
                  -20,
                  -33.33333,
                  0,
                  0,
                  0,
                  -25,
                  0,
                  -16.6666,
                  0,
                  0,
                  0,
                  0,
                  -20,
                  -5.78e-08,
                  0,
                  0,
                  0,
                  0,
                  0,
              ],
          )
      )
  
imports: from __future__ import absolute_import, division, print_function
  import unittest
  from madmom.features.beats_hmm import *
label_desc: Use image node_id 3 for calling the TestMultiPatternTransitionModelClass obj's underlying member method code with example usage: obj.test_values_bar() without return types