class_docstr: Writer class for 'score.scp'
  
  Examples:
      key1 /some/path/score.json
      key2 /some/path/score.json
      key3 /some/path/score.json
      key4 /some/path/score.json
      ...
  
      >>> writer = SingingScoreWriter('./data/', './data/score.scp')
      >>> writer['aa'] = score_obj
      >>> writer['bb'] = score_obj
class_docstr_tok: ["Writer","class","for","'score.scp'","Examples",":","key1","\/some\/path\/score.json","key2","\/some\/path\/score.json","key3","\/some\/path\/score.json","key4","\/some\/path\/score.json","...",">",">",">","writer","=","SingingScoreWriter","(","'.\/data\/","'",",","'.\/data\/score.scp","'",")",">",">",">","writer","[","'aa","'","]","=","score_obj",">",">",">","writer","[","'bb","'","]","=","score_obj"]
docstr: Score should be a dict
  
  Example:
  {
      "tempo": bpm,
      "item_list": a subset of ["st", "et", "lyric", "midi", "phn"],
      "note": [
          [start_time1, end_time1, lyric1, midi1, phn1],
          [start_time2, end_time2, lyric2, midi2, phn2],
          ...
      ]
  }
  
  The itmes in each note correspond to the "item_list".
docstr_tok: ["Score","should","be","a","dict","Example",":","{","``","tempo","''",":","bpm",",","``","item_list","''",":","a","subset","of","[","``","st","''",",","``","et","''",",","``","lyric","''",",","``","midi","''",",","``","phn","''","]",",","``","note","''",":","[","[","start_time1",",","end_time1",",","lyric1",",","midi1",",","phn1","]",",","[","start_time2",",","end_time2",",","lyric2",",","midi2",",","phn2","]",",","...","]","}","The","itmes","in","each","note","correspond","to","the","``","item_list","''","."]
code: def __setitem__(self, key: str, value: dict):
      """Score should be a dict
  
      Example:
      {
          "tempo": bpm,
          "item_list": a subset of ["st", "et", "lyric", "midi", "phn"],
          "note": [
              [start_time1, end_time1, lyric1, midi1, phn1],
              [start_time2, end_time2, lyric2, midi2, phn2],
              ...
          ]
      }
  
      The itmes in each note correspond to the "item_list".
  
      """
  
      score_path = self.dir / f"{key}.json"
      score_path.parent.mkdir(parents=True, exist_ok=True)
      with open(score_path, "w") as f:
          json.dump(value, f, ensure_ascii=False, indent=2)
      self.fscp.write(f"{key} {score_path}\n")
      self.data[key] = str(score_path)
  
imports: import collections.abc
  import json
  from pathlib import Path
  from typing import Union
  import numpy
  from typeguard import check_argument_types
  from espnet2.fileio.read_text import read_2columns_text
label_desc: Use image node_id 2 for calling the SingingScoreWriter obj's underlying member method code with example usage: obj.__setitem__(key, value) without return types