code: def __init__(self, subtype, closed: IntervalClosedType) -> None:
      # attributes need to be set first before calling
      # super init (as that calls serialize)
      assert closed in VALID_CLOSED
      self._closed: IntervalClosedType = closed
      if not isinstance(subtype, pyarrow.DataType):
          subtype = pyarrow.type_for_alias(str(subtype))
      self._subtype = subtype
  
      storage_type = pyarrow.struct(
          [("left", subtype), ("right", subtype)]
      )
      pyarrow.ExtensionType.__init__(
          self, storage_type, "pandas.interval"
      )
  
imports: from __future__ import annotations
  import json
  import pyarrow
  from pandas._typing import IntervalClosedType
  from pandas.core.arrays.interval import VALID_CLOSED
label_desc: Use image node_id 1 to create a new ArrowIntervalType object from inherited base classes: pyarrow with example: obj = ArrowIntervalType(subtype, closed)