code: def __init__(self, *args, **kwargs) -> None:
      super().__init__(*args, **kwargs)
      if isinstance(self.label, str):
          # Allow convenience of setting label as a string
          self.label = value(self.label)
  
imports: from __future__ import annotations
  import logging
  from typing import Any
  from ...core.enums import Align, AlternationPolicy, Anchor, LegendClickPolicy, LegendLocation, Location, Orientation
  from ...core.has_props import abstract
  from ...core.properties import Auto, Bool, Dict, Either, Enum, Float, Include, Instance, InstanceDefault, Int, List, NonNegative, Nullable, NullStringSpec, Override, Positive, Seq, String, TextLike, Tuple, value
  from ...core.property.vectorization import Field
  from ...core.property_mixins import ScalarFillProps, ScalarHatchProps, ScalarLineProps, ScalarTextProps
  from ...core.validation import error
  from ...core.validation.errors import BAD_COLUMN_NAME, NON_MATCHING_DATA_SOURCES_ON_LEGEND_ITEM_RENDERERS
  from ...model import Model
  from ..formatters import TickFormatter
  from ..labeling import LabelingPolicy, NoOverlap
  from ..mappers import ColorMapper
  from ..ranges import Range
  from ..renderers import GlyphRenderer
  from ..tickers import FixedTicker, Ticker
  from .annotation import Annotation
  from .dimensional import Dimensional, MetricLength
label_desc: Use image node_id 1 to create a new LegendItem object from inherited base classes: Model with example: obj = LegendItem()