def import_symbol(name):
    """
    Imports a symbol based on its fully qualified name.
    
    :param name: symbol name
    :type name: basestring
    :returns: symbol
    :raises ImportError: if could not import the module
    :raises AttributeError: if could not find the symbol in the module
    """
    if name and '.' in name:
        module_name, name = name.rsplit('.', 1)
        return getattr(__import__(module_name, fromlist=[name], level=0), name)
    raise ImportError('import not found: {}'.format(name))
