import importlib


def _object_from_name(object_name):
    """Creates an object from its name as a python string.

    Args:
        object_name: the name of the object to be created as a string.

    Returns: the object that the string refers to, dynamically imported.
    """
    module_name, top_name = object_name.rsplit('.', 1)
    the_module = importlib.import_module(module_name)
    return getattr(the_module, top_name)