code: def get_type(records, task):
      ll = set()
      if task == "NER":
          for record in records:
              ll.add(record["entity_type"])
      elif task == "RE":
          for record in records:
              ll.add(record["relation"])
      elif task == "EE":
          for record in records:
              ll.add(record["event_type"])
      return ll
  
file_path: DeepKE/example/llm/InstructKGC/kg2instruction/utils.py
imports: import random
  import json
  import hashlib
label_desc: Use image node_id 5 for calling a global function with example usage: get_type(records, task) and returns: ll