def try_cast_to_ea(cls_or_instance, obj, dtype=None):
    """
    Call to `_from_sequence` that returns the object unchanged on Exception.

    Parameters
    ----------
    cls_or_instance : ExtensionArray subclass or instance
    obj : arraylike
        Values to pass to cls._from_sequence
    dtype : ExtensionDtype, optional

    Returns
    -------
    ExtensionArray or obj
    """
    try:
        result = cls_or_instance._from_sequence(obj, dtype=dtype)
    except Exception:
        result = obj
    return result
