def from_file(obj, filename):
    """
        Deserialize data from file
        
        obj: must have deserialize and reset methods
        filename: the name of the file to read
    """
    obj.reset()
    with open(filename, 'r') as f:
        obj._deserialize(f)
