Original: A pirate code is a code of conduct invented for governing pirates.
Simplified: A pirate code is a code of conduct for pirates.