@classmethod
def parse(cls, name, data_size, reader, parsers):
    """given a 4 byte name, data_size int, BitstreamReader
        and dict of {"atom":handler} sub-parsers,
        returns an atom of this class"""
    assert name == b'mdhd'
    version, flags = reader.parse('8u 24u')
    if version == 0:
        atom_format = '32u 32u 32u 32u'
    else:
        atom_format = '64U 64U 32u 64U'
    created_utc_date, modified_utc_date, sample_rate, track_length = (reader
        .parse(atom_format))
    language = reader.parse('1p 5u 5u 5u')
    quality = reader.read(16)
    return cls(version=version, flags=flags, created_utc_date=
        created_utc_date, modified_utc_date=modified_utc_date, sample_rate=
        sample_rate, track_length=track_length, language=language, quality=
        quality)
