def get_task_flow_id_pair(tb_client, project_id):
    """
    获取 teambition 交易管理项目的 状态列表 的 name id pair
    :param project_id: 项目 id
    :param tb_client:
    :return:
    """
    task_flows = tb_client.get_project_scenariofieldconfigs(project_id)
    name_id_pair = dict()
    id_name_pair = dict()
    name_kind_pair = dict()
    id_kind_pair = dict()
    for status in task_flows[0]['taskflowstatuses']:
        name_id_pair[status['name']] = status['_id']
        id_name_pair[status['_id']] = status['name']
        name_kind_pair[status['name']] = status['kind']
        id_kind_pair[status['_id']] = status['kind']
    scenario_field_config_id = task_flows[0]['_id']
    return {'scenario_field_config_id': scenario_field_config_id,
        'task_flow_id_pair': name_id_pair, 'id_task_flow_pair':
        id_name_pair, 'task_flow_kind_pair': name_kind_pair, 'id_kind_pair':
        id_kind_pair}
