def list_versions(self, project_id, model_name):
result = []<EOL>full_parent_name = '<STR_LIT>'.format(<EOL>project_id, model_name)<EOL>request = self._mlengine.projects().models().versions().list(<EOL>parent=full_parent_name, pageSize=<NUM_LIT:100>)<EOL>response = request.execute()<EOL>next_page_token = response.get('<STR_LIT>', None)<EOL>result.extend(response.get('<STR_LIT>', []))<EOL>while next_page_token is not None:<EOL><INDENT>next_request = self._mlengine.projects().models().versions().list(<EOL>parent=full_parent_name,<EOL>pageToken=next_page_token,<EOL>pageSize=<NUM_LIT:100>)<EOL>response = next_request.execute()<EOL>next_page_token = response.get('<STR_LIT>', None)<EOL>result.extend(response.get('<STR_LIT>', []))<EOL>time.sleep(<NUM_LIT:5>)<EOL><DEDENT>return result<EOL>
Lists all available versions of a model. Blocks until finished.