code: def test_midi_to_svara_c(midi, Sa, mela, abbr, octave, unicode):
      svara = librosa.midi_to_svara_c(
          midi,
          Sa=Sa,
          mela=mela,
          abbr=abbr,
          octave=octave,
          unicode=unicode,
      )
  
      svara = np.asarray(svara)
      assert len(svara) == len(midi)
  
      if abbr:
          assert svara[Sa] == "S"
      else:
          assert svara[Sa] == "Sa"
  
      if sys.version >= "3.7":
          if not unicode:
              for s in svara:
                  assert s.isascii()
  
      if not abbr:
          for s in svara:
              # Lengths for unicode can get lengthy, eg
              # Dha2'
              assert 0 < len(s) < 6
      else:
          for s in svara:
              assert 0 < len(s) < 4
  
      # Octave decorations should separate out per octave
      if octave:
          assert not np.all(svara[:12] == svara[12:24])
          assert not np.all(svara[12:24] == svara[24:])
      else:
          assert np.all(svara[:12] == svara[12:24])
          assert np.all(svara[:12] == svara[24:])
  
imports: import os
  import sys
  import warnings
  import librosa
  import numpy
  import pytest
label_desc: Use image node_id 42 for calling a global function with example usage: test_midi_to_svara_c(midi, Sa, mela, abbr, octave, unicode) without return types