code: def interval(interval_str):
      """
      Convert a string representation of a musical interval into a pitch class
      (e.g. a minor seventh 'b7' into 10, because it is 10 semitones above its
      base note).
  
      Parameters
      ----------
      interval_str : str
          Musical interval.
  
      Returns
      -------
      pitch_class : int
          Number of semitones to base note of interval.
  
      """
      for i, c in enumerate(interval_str):
          if c.isdigit():
              return (
                  modify(
                      _chroma_id[int(interval_str[i:]) - 1],
                      interval_str[:i],
                  )
                  % 12
              )
  
imports: import numpy
  from .None import evaluation_io, EvaluationMixin
  from ..io import load_chords
label_desc: Use image node_id 6 for calling a global function with example usage: interval(interval_str) and returns: unknown