class_docstr: A :class:`label` should work like a :class:`str`,
  but it also records extra information to help reusing the label.
  
  As :func:`auto_label` prepends a prefix to the label,
  we need to identify whether the label has been processed by :func:`auto_label` or not,
  which is done by :class:`label`.
  
  Generally, it should work like a string which contains the label name.
class_docstr_tok: ["A",":","class",":","`","label","`","should","work","like","a",":","class",":","`","str","`",",","but","it","also","records","extra","information","to","help","reusing","the","label",".","As",":","func",":","`","auto_label","`","prepends","a","prefix","to","the","label",",","we","need","to","identify","whether","the","label","has","been","processed","by",":","func",":","`","auto_label","`","or","not",",","which","is","done","by",":","class",":","`","label","`",".","Generally",",","it","should","work","like","a","string","which","contains","the","label","name","."]
docstr: Convert the label to a label scope.
docstr_tok: ["Convert","the","label","to","a","label","scope","."]
code: def as_scope(self) -> label_scope:
      """Convert the label to a label scope."""
      return label_scope(_path=self.parts)
  
imports: from __future__ import annotations
  import logging
  from collections import defaultdict
  from typing import Any, List, cast
label_desc: Use image node_id 2 for calling the label obj's underlying member method code with example usage: obj.as_scope() and returns: label_scope