method finds unit_of_work record and returns it to the caller

def get_by_params(self, process_name, timeperiod, start_id, end_id):
        """ method finds unit_of_work record and returns it to the caller"""
        query = {unit_of_work.PROCESS_NAME: process_name,
                 unit_of_work.TIMEPERIOD: timeperiod,
                 unit_of_work.START_ID: start_id,
                 unit_of_work.END_ID: end_id}
        collection = self.ds.connection(COLLECTION_UNIT_OF_WORK)

        document = collection.find_one(query)
        if document is None:
            raise LookupError('UOW satisfying query {0} was not found'.format(query))
        return UnitOfWork.from_json(document)