def METHOD_NAME(refer_nodes, refer_layer_orders):
    """
    @summary: 根据相邻层有连接的点求中位数
    @param refer_nodes:
    @param refer_layer_orders:
    @return:
    """
    layer_orders_index = sorted([refer_layer_orders.index(ref) for ref in refer_nodes])
    refer_len = len(layer_orders_index)
    # 没有相邻顶点的节点中位数值被设置为-1，让这些节点维持原来位置
    if refer_len == 0:
        return -1
    elif refer_len % 2 == 1:
        return layer_orders_index[refer_len // 2]
    else:
        return (layer_orders_index[(refer_len // 2) - 1] + layer_orders_index[refer_len // 2]) / 2