def safer_getattr(obj: Any, k: str, default: Optional[Any] = None) -> Any:
    """Get the attribute `k` of the given object.

    Returns default if the attribute cannot be retrieved.
    """

    try:
        return safe_getattr(obj, k)
    except Exception:
        return default
Get the attribute `k` of the given object.

    Returns default if the attribute cannot be retrieved.
    
src/core/trulens/core/utils/python.py