def parse_dataset_sid_pid2eval_sid_pid(dataset_sid_pid2eval_sid_pid):
  """
  Parsing priority, sid_pid is mapped to:
    1. dataset_sid_pid2eval_sid_pid[sid_pid] if it exists, else
    2. to the same sid_pid

  Returns:
    sid_pid2eval_id: a dense mapping having keys for all possible sid_pid s (0 to 99_99)
      using the provided sparse dataset_sid_pid2eval_sid_pid
  """
  dsp2spe_new = dict()
  for k in range(10000):
    sid_pid_new = dataset_sid_pid2eval_sid_pid.get(k, k)
    dsp2spe_new[k] = sid_pid_new if sid_pid_new != 'IGNORED' else k
  assert all(v in list(range(10000)) for v in dsp2spe_new.values()), dsp2spe_new.values()
  return dsp2spe_new