'Create a Model. Blocks until finished.'

def create_model(self, project_id, model):

    assert ((model['name'] is not None) and (model['name'] is not ''))
    project = 'projects/{}'.format(project_id)
    request = self._cloudml.projects().models().create(parent=project, body=model)
    return request.execute()
