<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_gain_from_frames(frame_filenames, gain_channel_name, start_time, end_time):
    '''
    Returns the gain from the file.
    '''

    # get timeseries from frame
    gain = frame.read_frame(frame_filenames, gain_channel_name,
                      start_time=start_time, end_time=end_time)

    return gain[0]