def get_nt_nchans_for_out(out, timit_pitch):
    """Returns number of time points and channels for one subject

    out is returned from timit.load_h5py_out(subject_number) and contains TIMIT data for one subject.

    This function goes through each TIMIT trial to determine how many timepoints of data are there.
    """
    nt = 0
    for trial in out:
        nchans = out[trial]['ecog'].shape[0]
        timit_name = out[trial].attrs['timit_name'][0]
        for i in range(out[trial]['ecog'].shape[2]):
            nt = nt + timit_pitch.loc[timit_name].pitch.shape[0]
    return nt, nchans
