class_docstr: Constructs a Pop2Piano tokenizer. This tokenizer does not require training.
  
  This tokenizer inherits from [`PreTrainedTokenizer`] which contains most of the main methods. Users should refer to
  this superclass for more information regarding those methods.
  
  Args:
      vocab (`str`):
          Path to the vocab file which contains the vocabulary.
      default_velocity (`int`, *optional*, defaults to 77):
          Determines the default velocity to be used while creating midi Notes.
      num_bars (`int`, *optional*, defaults to 2):
          Determines cutoff_time_idx in for each token.
docstr: Saves the tokenizer's vocabulary dictionary to the provided save_directory.
  
  Args:
      save_directory (`str`):
          A path to the directory where to saved. It will be created if it doesn't exist.
      filename_prefix (`Optional[str]`, *optional*):
          A prefix to add to the names of the files saved by the tokenizer.
docstr_tok: ["Saves","the","tokenizer","'s","vocabulary","dictionary","to","the","provided","save_directory",".","Args",":","save_directory","(","`","str","`",")",":","A","path","to","the","directory","where","to","saved",".","It","will","be","created","if","it","does","n't","exist",".","filename_prefix","(","`","Optional","[","str","]","`",",","*","optional","*",")",":","A","prefix","to","add","to","the","names","of","the","files","saved","by","the","tokenizer","."]
code: def save_vocabulary(
      self, save_directory: str, filename_prefix: Optional[str] = None
  ) -> Tuple[str]:
      """
      Saves the tokenizer's vocabulary dictionary to the provided save_directory.
  
      Args:
          save_directory (`str`):
              A path to the directory where to saved. It will be created if it doesn't exist.
          filename_prefix (`Optional[str]`, *optional*):
              A prefix to add to the names of the files saved by the tokenizer.
      """
      if not os.path.isdir(save_directory):
          logger.error(
              f"Vocabulary path ({save_directory}) should be a directory"
          )
          return
  
      # Save the encoder.
      out_vocab_file = os.path.join(
          save_directory,
          (filename_prefix + "-" if filename_prefix else "")
          + VOCAB_FILES_NAMES["vocab"],
      )
      with open(out_vocab_file, "w") as file:
          file.write(json.dumps(self.encoder))
  
      return (out_vocab_file,)
  
imports: import json
  import os
  from typing import List, Optional, Tuple, Union
  import numpy
  from ...feature_extraction_utils import BatchFeature
  from ...tokenization_utils import AddedToken, BatchEncoding, PaddingStrategy, PreTrainedTokenizer, TruncationStrategy
  from ...utils import TensorType, is_pretty_midi_available, logging, requires_backends, to_numpy
label_desc: Use image node_id 10 for calling the Pop2PianoTokenizer obj's underlying member method code with example usage: obj.save_vocabulary(save_directory, filename_prefix) and returns: out_vocab_file