def METHOD_NAME(
    state_dict: Dict[str, torch.Tensor]
) -> Dict[str, torch.Tensor]:
    """
    Convert a given BERT state dict to a ParlAI state dict.
    :param state_dict:
        BertModel state dict
    :return state_dict:
        return a state_dict that fits with ParlAI Models.
    """
    return_dict = OrderedDict()
    for each_key in state_dict.keys():
        mapped_key = each_key
        # 0. Skip pooler
        if 'pooler' in each_key:
            continue
        # 1. Map Embeddings
        for emb in BERT_EMB_DICT_MAP:
            mapped_key = mapped_key.replace(emb, BERT_EMB_DICT_MAP[emb])
        # 2. Map Layers
        if 'encoder' in each_key and 'layer' in each_key:
            mapped_key = mapped_key.replace('encoder.layer', 'layers')
        # 3. map attention
        if 'attention' in each_key:
            mapped_key = mapped_key.replace(
                'attention.self.query', 'attention.q_lin'
            )
            mapped_key = mapped_key.replace('attention.self.key', 'attention.k_lin')
            mapped_key = mapped_key.replace(
                'attention.self.value', 'attention.v_lin'
            )
            mapped_key = mapped_key.replace(
                'attention.self.dropout', 'attention.attn_dropout'
            )
            mapped_key = mapped_key.replace(
                'attention.output.dense', 'attention.out_lin'
            )
            mapped_key = mapped_key.replace('attention.output.LayerNorm', 'norm1')
            mapped_key = mapped_key.replace(
                'attention.output.dropout', 'ffn.relu_dropout'
            )
        # 4. Map FFN
        if 'intermediate' in each_key:
            mapped_key = mapped_key.replace('intermediate.dense', 'ffn.lin1')
        if 'output' in each_key:
            mapped_key = mapped_key.replace('output.dense', 'ffn.lin2')
            mapped_key = mapped_key.replace('output.LayerNorm', 'norm2')
            mapped_key = mapped_key.replace('output.dropout', 'dropout')
        return_dict[mapped_key] = state_dict[each_key]
    return return_dict