@staticmethod<EOL><INDENT>def _load_obj(name):<DEDENT>
for maxsplit in range(<NUM_LIT:1>, name.count('<STR_LIT:.>') + <NUM_LIT:1>):<EOL><INDENT>func_name_split = name.rsplit('<STR_LIT:.>', maxsplit)<EOL>module = func_name_split[<NUM_LIT:0>]<EOL>func_parts = func_name_split[<NUM_LIT:1>:]<EOL>try:<EOL><INDENT>obj = importlib.import_module(module)<EOL><DEDENT>except ImportError:<EOL><INDENT>pass<EOL><DEDENT>else:<EOL><INDENT>continue<EOL><DEDENT><DEDENT>if '<STR_LIT>' not in locals():<EOL><INDENT>raise ImportError('<STR_LIT>'<EOL>'<STR_LIT>'.format(name))<EOL><DEDENT>for part in func_parts:<EOL><INDENT>obj = getattr(obj, part)<EOL><DEDENT>return obj<EOL>
Import Python object from its name as string.

Parameters
----------
name : str
    Object name to import (e.g. pandas.Series.str.upper)

Returns
-------
object
    Python object that can be a class, method, function...

Examples
--------
>>> Docstring._load_obj('pandas.Series')
<class 'pandas.core.series.Series'>