code: def _register_subscription_handling():
      if _py_version() >= (3, 9):
          return
  
      def subscript_to_doc(x: ast.Subscript) -> doc.Subscript:
          if isinstance(x.slice, ast.Slice):
              return doc.Subscript(
                  value=to_doc(x.value),
                  slice=doc.Slice(
                      lower=to_doc(x.slice.lower),
                      upper=to_doc(x.slice.upper),
                      step=to_doc(x.slice.step),
                      lineno=getattr(x.slice, "lineno", None),
                      col_offset=getattr(x.slice, "col_offset", None),
                      end_lineno=getattr(x.slice, "end_lineno", None),
                      end_col_offset=getattr(
                          x.slice, "end_col_offset", None
                      ),
                  ),
                  ctx=to_doc(x.ctx),
                  lineno=getattr(x, "lineno", None),
                  col_offset=getattr(x, "col_offset", None),
                  end_lineno=getattr(x, "end_lineno", None),
                  end_col_offset=getattr(x, "end_col_offset", None),
              )
          if isinstance(x.slice, ast.ExtSlice):
              return doc.Subscript(
                  value=to_doc(x.value),
                  slice=doc.Tuple(
                      elts=[to_doc(i) for i in x.slice.dims],
                      ctx=doc.Load(
                          lineno=None,
                          col_offset=None,
                          end_lineno=None,
                          end_col_offset=None,
                      ),
                      lineno=getattr(x, "lineno", None),
                      col_offset=getattr(x, "col_offset", None),
                      end_lineno=getattr(x, "end_lineno", None),
                      end_col_offset=getattr(x, "end_col_offset", None),
                  ),
                  ctx=to_doc(x.ctx),
                  lineno=getattr(x, "lineno", None),
                  col_offset=getattr(x, "col_offset", None),
                  end_lineno=getattr(x, "end_lineno", None),
                  end_col_offset=getattr(x, "end_col_offset", None),
              )
          if isinstance(x.slice, ast.Index):
              return doc.Subscript(
                  value=to_doc(x.value),
                  slice=to_doc(x.slice.value),
                  ctx=to_doc(x.ctx),
                  lineno=getattr(x, "lineno", None),
                  col_offset=getattr(x, "col_offset", None),
                  end_lineno=getattr(x, "end_lineno", None),
                  end_col_offset=getattr(x, "end_col_offset", None),
              )
          raise TypeError(f"Unknown subscript type: {type(x.slice)}")
  
      def subscript_from_doc(x: doc.Subscript) -> ast.Subscript:
          if isinstance(x.slice, doc.Slice):
              result = ast.Subscript(
                  value=from_doc(x.value),
                  slice=from_doc(x.slice),
                  ctx=from_doc(x.ctx),
              )
          elif isinstance(x.slice, doc.Tuple):
  
              def remap_dim(doc_item: doc.Expr) -> ast.Expr:
                  ast_item = from_doc(doc_item)
                  if isinstance(ast_item, (ast.Index, ast.Slice)):
                      return ast_item
                  return ast.Index(value=ast_item)
  
              # ast.ExtSlice requires a non-empty list of dims, and each dim must be either
              # a Slice or an Index.
              if x.slice.elts:
                  ast_slice = ast.ExtSlice(
                      dims=[*map(remap_dim, x.slice.elts)]
                  )
              else:
                  ast_slice = ast.Index(
                      value=ast.Tuple(elts=[], ctx=from_doc(x.ctx))
                  )
              result = ast.Subscript(
                  value=from_doc(x.value),
                  slice=ast_slice,
                  ctx=from_doc(x.ctx),
              )
          else:
              result = ast.Subscript(
                  value=from_doc(x.value),
                  slice=ast.Index(value=from_doc(x.slice)),
                  ctx=from_doc(x.ctx),
              )
          result.lineno = x.lineno
          result.col_offset = x.col_offset
          result.end_lineno = x.end_lineno
          result.end_col_offset = x.end_col_offset
          return result
  
      register_to_doc("Subscript")(subscript_to_doc)
      register_from_doc("Subscript")(subscript_from_doc)
  
imports: import ast
  import inspect
  import sys
  import typing
  from collections import defaultdict
  from .None import doc_core
  from .doc_core import *
label_desc: Use image node_id 11 for calling a global function with example usage: _register_subscription_handling() and returns: result, doc, doc, doc, ast, ast_item