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"]
code: def __init__(
      self,
      outdir: Union[Path, str],
      scpfile: Union[Path, str],
  ):
      assert check_argument_types()
      self.dir = Path(outdir)
      self.dir.mkdir(parents=True, exist_ok=True)
      scpfile = Path(scpfile)
      scpfile.parent.mkdir(parents=True, exist_ok=True)
      self.fscp = scpfile.open("w", encoding="utf-8")
      self.data = {}
  
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 1 to create a new SingingScoreWriter object  with example: obj = SingingScoreWriter(outdir, scpfile)