def import_object(import_str):
    """Returns an object including a module or module and class."""
    try:
        __import__(import_str)
        return sys.modules[import_str]
    except __HOLE__:
        cls = import_class(import_str)
        return cls()
dataset/ETHPy150Open nii-cloud/dodai-compute/nova/utils.py/import_object