def in_time_frame(sim_start_epoch, sim_end_epoch,
                  rec_start_epoch, rec_end_epoch):
    """
    Check wheter record is inside the simulation time frame.
    :param sim_start_epoch: simluation start.
    :param sim_end_epoch: simulation end.
    :param rec_start_epoch: record start.
    :param rec_end_epoch: record end.
    :return: True if record overlaps with the simulation time frame.
    """
    outside = (rec_end_epoch <= sim_start_epoch or
               sim_end_epoch <= rec_start_epoch)
    return not outside