def parse_specifier(specifier):
    """A utility to parse "specifier"

    Args:
        specifier (str):
    Returns:
        parsed_dict (OrderedDict):
            Like {'ark': 'file.ark', 'scp': 'file.scp'}


    >>> d = parse_specifier('ark,t,scp:file.ark,file.scp')
    >>> print(d['ark,t'])
    file.ark

    """
    sp = specifier.split(':', 1)
    if len(sp) != 2:
        if ':' not in specifier:
            raise ValueError(
                'The output file must be specified with kaldi-specifier style, e.g. ark,scp:out.ark,out.scp, but you gave as {}'
                .format(specifier))
    types, files = sp
    types = types.split(',')
    if 'ark' not in types and 'scp' not in types:
        raise ValueError(
            'One of/both ark and scp is required: e.g. ark,scp:out.ark,out.scp: {}'
            .format(specifier))
    elif 'ark' in types and 'scp' in types:
        if ',' not in files:
            raise ValueError(
                'You specified both ark and scp, but a file path is given: e.g. ark,scp:out.ark,out.scp: {}'
                .format(specifier))
        files = files.split(',', 1)
    else:
        files = [files]
    spec_dict = {'ark': None, 'scp': None, 't': False, 'o': False, 'p': 
        False, 'f': False, 's': False, 'cs': False}
    for t in types:
        if t not in spec_dict:
            raise ValueError('Unknown option {}()'.format(t, types))
        if t in ('scp', 'ark'):
            if spec_dict[t] is not None:
                raise ValueError('You specified {} twice'.format(t))
            spec_dict[t] = files.pop(0)
        else:
            spec_dict[t] = True
    return spec_dict
