code: def negative_sample(self, record, task):
      positive = get_type(record, task)
      negative = list()
      if task == "RE":
          negative = self.role_list - positive
          for it in negative:
              record.append({"head": "", "relation": it, "tail": ""})
      elif task == "NER":
          negative = self.type_list - positive
          for it in negative:
              record.append({"entity": "", "entity_type": it})
      else:
          negative = self.type_list - positive
          for it in negative:
              record.append(
                  {
                      "event_trigger": "",
                      "event_type": it,
                      "arguments": list(),
                  }
              )
      type_list = []
      if len(positive) != 0:
          type_list.extend(list(positive))
      if len(negative) != 0:
          type_list.extend(negative)
      return record, type_list, list(self.role_list)
  
file_path: DeepKE/example/llm/InstructKGC/kg2instruction/utils.py
imports: import random
  import json
  import hashlib
label_desc: Use image node_id 2 for calling the FullSampler obj's underlying member method code with example usage: obj.negative_sample(record, task) and returns: record,  type_list,  list