"代码示例" can be translated into English as "code example" or "code snippet example" (though "code example" is more commonly used and sufficient in most contexts).
For example:
Here is a code example to demonstrate the function.
Let me show you a code example.