def _cancelledToTimedOutError(value, timeout):
 if isinstance(value, failure.Failure):
  value.trap(CancelledError)
  raise TimeoutError(timeout, 'Deferred')
 return value

def _cancelledToTimedOutError ( value , timeout ) : if isinstance ( value , failure . Failure ) : value . trap ( CancelledError ) raise TimeoutError ( timeout , 'Deferred' ) return value
a default translation function that translates l{failure}s that are l{cancellederror}s to l{timeouterror}s .