'Close the badges modal and check that it is no longer displayed.'

def close_modal(self):

    self.bring_model_inside_window()
    self.q(css='.badges-modal    .close').click()
    EmptyPromise((lambda : (not self.modal_displayed())), 'Share    modal    dismissed').fulfill()
