
    ^h                    *    S r SSKJr  SSKJr  SS jrg)z:
A simple utility to import something by its string name.
    )annotations)Anyc                2   [        U [        5      (       d  [        S[        U 5      -  5      eU R	                  SS5      n[        U5      S:X  a  Uu  p#[        X#/S9n [        XC5      nU$ [        US   5      $ ! [         a  n[        SU-  5      UeSnAff = f)	a]  Import and return ``bar`` given the string ``foo.bar``.

Calling ``bar = import_item("foo.bar")`` is the functional equivalent of
executing the code ``from foo import bar``.

Parameters
----------
name : string
    The fully qualified name of the module/package being imported.

Returns
-------
mod : module object
    The module that was imported.
z&import_item accepts strings, not '%s'..      )fromlistzNo module named %sNr   )

isinstancestr	TypeErrortypersplitlen
__import__getattrAttributeErrorImportError)namepartspackageobjmodulepakes          V/home/james-whalen/.local/lib/python3.13/site-packages/traitlets/utils/importstring.pyimport_itemr      s      dC  @4:MNNKKQE
5zQGe4	A&&C 
 %(##  	A2S89q@	As   A8 8
BBBN)r   r   returnr   )__doc__
__future__r   typingr   r        r   <module>r#      s   
 # $r"   