def commit(self, wait=False, wait_interval=5, timeout=None):
        response = self._client.commit_bulk_import(self.name)
        if wait:
            started_at = time.time()
            while self._status != self.STATUS_COMMITTED:
                if timeout is None or abs(time.time() - started_at) < timeout:
                    time.sleep(wait_interval)
                else:
                    raise RuntimeError("timeout") # TODO: throw proper error
                self.update()
        else:
            self.update()
        return response
TODO: add docstring
dataset/ETHPy150Open treasure-data/td-client-python/tdclient/bulk_import_model.py/BulkImport.commit