code: def named_entity(docs):
      """Create a named entity visualization.
  
      Taken from https://github.com/wandb/wandb/blob/main/wandb/plots/named_entity.py.
      """
      spacy = util.get_module(
          "spacy",
          required="part_of_speech requires the spacy library, install with `pip install spacy`",
      )
  
      util.get_module(
          "en_core_web_md",
          required="part_of_speech requires `en_core_web_md` library, install with `python -m spacy download en_core_web_md`",
      )
  
      # Test for required packages and missing & non-integer values in docs data
      if test_missing(docs=docs):
          html = spacy.displacy.render(
              docs, style="ent", page=True, minify=True, jupyter=False
          )
          wandb_html = wandb.Html(html)
          return wandb_html
  
file_path: wandb/wandb/integration/prodigy/prodigy.py
imports: import base64
  import collections.abc
  import io
  import urllib
  from copy import deepcopy
  import pandas
  from PIL import Image
  import wandb
  from wandb import util
  from wandb.plots.utils import test_missing
  from wandb.sdk.lib import telemetry
label_desc: Use image node_id 1 for calling a global function with example usage: named_entity(docs) and returns: wandb_html