<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _read_stc(stc_file):
 """Read Segment Table of Contents file. Returns ------- hdr : dict - next_segment : Sample frequency in Hertz - final : Number of channels stored - padding : Padding stamps : ndarray of dtype - segment_name : Name of ERD / ETC file segment - start_stamp : First sample stamp that is found in the ERD / ETC pair - end_stamp : Last sample stamp that is still found in the ERD / ETC pair - sample_num : Number of samples actually being recorded (gaps in the data are not included in this number) - sample_span : Number of samples in that .erd file Notes ----- The Segment Table of Contents file is an index into pairs of (raw data file / table of contents file). It is used for mapping samples file segments. EEG raw data is split into segments in order to break a single file size limit (used to be 2GB) while still allowing quick searches. This file ends in the extension '.stc'. Default segment size (size of ERD file after which it is closed and new [ERD / ETC] pair is opened) is 50MB. The file starts with a generic EEG file header, and is followed by a series of fixed length records called the STC entries. ERD segments are named according to the following schema: - <FIRST_NAME>, <LAST_NAME>_<GUID>.ERD (first) - <FIRST_NAME>, <LAST_NAME>_<GUID>.ETC (first) - <FIRST_NAME>, <LAST_NAME>_<GUID>_<INDEX>.ERD (second and subsequent) - <FIRST_NAME>, <LAST_NAME>_<GUID>_<INDEX>.ETC (second and subsequent) <INDEX> is formatted with "%03d" format specifier and starts at 1 (initial value being 0 and omitted for compatibility with the previous versions). """

    hdr = _read_hdr_file(stc_file)  # read header the normal way

    stc_dtype = dtype([('segment_name', 'a256'),
                       ('start_stamp', '<i'),
                       ('end_stamp', '<i'),
                       ('sample_num', '<i'),
                       ('sample_span', '<i')])

    with stc_file.open('rb') as f:
        f.seek(352)  # end of header
        hdr['next_segment'] = unpack('<i', f.read(4))[0]
        hdr['final'] = unpack('<i', f.read(4))[0]
        hdr['padding'] = unpack('<' + 'i' * 12, f.read(48))

        stamps = fromfile(f, dtype=stc_dtype)

    return hdr, stamps