code: def _clean_data(data):
      """
      清洗数据，去除一些头尾实体不存在的句子
      Args:
          data((List[Dict])): 需要处理的数据
      Returns:
          clean_data : 处理后的数据
      """
      clean_data = []
      for d in data:
          sent = d["sentence"]
          head = d["head"]
          tail = d["tail"]
          if head in sent and tail in sent:
              clean_data.append(d)
      return clean_data
  
file_path: DeepKE/src/deepke/relation_extraction/standard/tools/preprocess.py
imports: import os
  import logging
  from collections import OrderedDict
  from typing import List, Dict
  from transformers import BertTokenizer
  from .serializer import Serializer
  from .vocab import Vocab
  import sys
  from utils import save_pkl, load_csv
label_desc: Use image node_id 8 for calling a global function with example usage: _clean_data(data) and returns: clean_data