def _instantiate_resource(item):
    try:
        res = item()
    except __HOLE__:
        return None
    else:
        return res if _is_resource_obj(res) else None
dataset/ETHPy150Open wuher/devil/devil/perm/management.py/_instantiate_resource