import pickle


def load_state(filename):
    """Load the annotation state stored in filename.
    """  
    with open(filename, 'rb') as input_state_file:
        loaded_state = pickle.load(input_state_file) 
    return loaded_state