code: def named_entity_recognition(doc):
      pred_whole = set()
      output = {
          "entity": [],
          "star_char": [],
          "end_char": [],
          "label_": [],
      }
      for ent in doc.ents:
          output["entity"].append(str(ent))
          output["star_char"].append(ent.start_char)
          output["end_char"].append(ent.end_char)
          output["label_"].append(ent.label_)
          pred_whole.add((ent.start_char, ent.end_char, ent.label_))
      return pred_whole, output
  
file_path: mindsdb/mindsdb/integrations/handlers/spacy_handler/spacy_handler.py
imports: import spacy
  import pandas
  from mindsdb.integrations.libs.base import BaseMLEngine
  from typing import Optional
label_desc: Use image node_id 1 for calling a global function with example usage: named_entity_recognition(doc) and returns: pred_whole,  output