def _xla_disabled_error(primitive_name: str, extra_msg: Optional[str]=None) -> Exception:
    assert (not _enable_xla)
    msg = f'Call to {primitive_name} cannot be converted with enable_xla=False.'
    if extra_msg:
        msg += f' {extra_msg}'
    return NotImplementedError(msg)
def _xla_disabled_error(primitive_name: str, extra_msg: Optional[str]=None) -> Exception:
    assert (not _enable_xla)
    msg = f'Call to {primitive_name} cannot be converted with enable_xla=False.'
    if extra_msg:
        msg += f' {extra_msg}'
    return NotImplementedError(msg)