class_docstr: A dict-like proxy held by the Doc, to control access to span groups.
class_docstr_tok: ["A","dict-like","proxy","held","by","the","Doc",",","to","control","access","to","span","groups","."]
code: def _ensure_doc(self) -> "Doc":
      doc = self.doc_ref()
      if doc is None:
          raise ValueError(Errors.E866)
      return doc
  
file_path: spaCy/spacy/tokens/_dict_proxies.py
imports: import warnings
  import weakref
  from collections import UserDict
  from typing import TYPE_CHECKING, Dict, Iterable, List, Optional, Tuple, Union
  import srsly
  from ..errors import Errors, Warnings
  from .span_group import SpanGroup
label_desc: Use image node_id 8 for calling the SpanGroups obj's underlying member method code with example usage: obj._ensure_doc() and returns: doc