'Get latest build for project
finished
Return only builds that are in a finished state'

def get_latest_build(self, finished=True):

    kwargs = {'type': 'html'}
    if finished:
        kwargs['state'] = 'finished'
    return self.builds.filter(**kwargs).first()
