'Compute and return the diff from a previous version of the object to
the latest version of the object.
:param generation_hash: The generation hash of the previous version of
the object.
:returns: A `Diff` that will convert a former version of the object
being tracked. Or ``None`` if this object is no longer tracking any
previous version object with the passed in ``generation_hash``.'

def get_diff_from_hash_to_latest(self, generation_hash):

    if (generation_hash is None):
        return None
    if (self._latest_hash == generation_hash):
        return compose_diffs([])
    results = []
    for record in self._queue:
        if (record.generation_hash == generation_hash):
            results = [record.diff_to_next]
        elif results:
            results.append(record.diff_to_next)
    if results:
        return compose_diffs(results)
    else:
        return None
