code: def dtype_short_repr_to_dtype(
      dtype_string: str | None,
  ) -> PolarsDataType | None:
      """Map a PolarsDataType short repr (eg: 'i64', 'list[str]') back into a dtype."""
      if dtype_string is None:
          return None
      m = re.match(r"^(\w+)(?:\[(.+)\])?$", dtype_string)
      if m is None:
          return None
  
      dtype_base, subtype = m.groups()
      dtype = DataTypeMappings.REPR_TO_DTYPE.get(dtype_base)
      if dtype and subtype:
          # TODO: further-improve handling for nested types (such as List,Struct)
          try:
              if dtype == Decimal:
                  subtype = (None, int(subtype))
              else:
                  subtype = (
                      s.strip("'\" ")
                      for s in subtype.replace("μs", "us").split(",")
                  )
              return dtype(*subtype)  # type: ignore[operator]
          except ValueError:
              pass
      return dtype
  
imports: from __future__ import annotations
  import contextlib
  import ctypes
  import functools
  import re
  import sys
  from datetime import date, datetime, time, timedelta
  from decimal import Decimal
  from typing import TYPE_CHECKING, Any, Collection, ForwardRef, Optional, Union, get_args, overload
  from polars.datatypes import Array, Binary, Boolean, Categorical, DataType, DataTypeClass, Date, Datetime, Decimal, Duration, Field, Float32, Float64, Int8, Int16, Int32, Int64, List, Null, Object, String, Struct, Time, UInt8, UInt16, UInt32, UInt64, Unknown
  from polars.dependencies import numpy
  from polars.dependencies import pyarrow
label_desc: Use image node_id 11 for calling a global function with example usage: dtype_short_repr_to_dtype(dtype_string) and returns: dtype, None, None, dtype