def METHOD_NAME(data, workspace):
    """根据request创建project。
    Args:
        data为dict,key包括
        'name'项目名, 'desc'项目描述，'project_type'项目类型和'path'
        项目路径，`path`(可选)，不设置或为None，表示使用默认的生成路径
    """
    create_time = time.time()
    time_array = time.localtime(create_time)
    create_time = time.strftime("%Y-%m-%d %H:%M:%S", time_array)
    id = workspace.max_project_id + 1
    workspace.max_project_id = id
    if id < 10000:
        id = 'P%04d' % id
    else:
        id = 'P{}'.format(id)
    assert not id in workspace.projects, "【项目创建】ID'{}'已经被占用.".format(id)
    if 'path' not in data:
        path = osp.join(workspace.path, 'projects', id)
    if not osp.exists(path):
        os.makedirs(path)
    pj = w.Project(
        id=id,
        name=data['name'],
        desc=data['desc'],
        type=data['project_type'],
        create_time=create_time,
        path=path)
    workspace.projects[id].CopyFrom(pj)
    with open(os.path.join(path, 'info.pb'), 'wb') as f:
        f.write(pj.SerializeToString())
    return {'status': 1, 'pid': id}