code: def _write_projector_embedding(learn, writer, feat):
      lbls = (
          [learn.dl.vocab[l] for l in feat["lbl"]]
          if getattr(learn.dl, "vocab", None)
          else None
      )
      vecs = feat["vec"].squeeze()
      writer.add_embedding(
          vecs,
          metadata=lbls,
          label_img=feat["img"],
          global_step=learn.train_iter,
      )
  
imports: from __future__ import annotations
  from ..basics import *
  import tensorboard
  from torch.utils.tensorboard import SummaryWriter
  from .fp16 import ModelToHalf
  from .hook import hook_output
  from ..text.all import LMLearner, TextLearner
  from ..vision.data import *
  from ..vision.core import TensorPoint, TensorBBox
label_desc: Use image node_id 1 for calling a global function with example usage: _write_projector_embedding(learn, writer, feat) without return types