There are exceptions, but these are extremely rare.
Look for code created in collaboration by multiple engineers, with contributors or reviewers across multiple teams. This code is more likely to be an asset.
(Unless created by Google for external use or by xOoglers. Such code outside Google is a near guaranteed liability.)