import pickle


def load_object(filename):
    """
    Load a python object stored in a file using pickle
    :param filename: File from which to load the object
    :return:
    """
    with open(filename, 'rb') as input_file:  # Overwrites any existing file.
        obj = pickle.load(input_file)
    return obj