Fix doc update of datashape that was missed
Move lookup_previous function out of datashape project