def _parse_spectrum(line: str, spec: list) -> int:
    """
    Add peak data to spec
    :param line: The raw line information from .msp file
    :param spec: The spectrum will be added.
    :return: 0: success. 1: no information in this line.
    """
    lines = line.split()
    if len(lines) >= 2:
        mz, intensity = lines[0], lines[1]
        spec.append([float(mz), float(intensity)])
        return 0
    else:
        return 1