def METHOD_NAME(middle_frame, max_frames):
    """
    Get the first and last frame to extract.
    """
    if max_frames % 2 == 0:
        from_frame = middle_frame - (max_frames / 2)
        to_frame = middle_frame + (max_frames / 2) - 1
    else:
        from_frame = middle_frame - ((max_frames - 1) / 2)
        to_frame = middle_frame + ((max_frames - 1) / 2)
    return from_frame, to_frame