def METHOD_NAME(name):
    """
    return the object or module from the path given
    >>> import os.path
    >>> mod = import_from_string('os.path')
    >>> os.path is mod
    True
    >>> from os.path import isabs
    >>> cls = import_from_string('os.path.isabs')
    >>> isabs is cls
    True
    """
    components = name.split('.')
    res = __import__(components[0])
    for comp in components[1:]:
        res = getattr(res, comp)
    return res