The Custom Code regions are badly named, and will be renamed soon. These regions are for the place where the include templates code is placed. For the entity collections in the 2-class scenario, it will include a template bound to the template id Custom_EntityCollectionUsingEntityBaseTemplate
So if you create a custom template set config (for example using the TemplateStudio application) and you add a template binding to the Custom_EntityCollectionUsingEntityBaseTemplate id and the file you bind to that id, you add the code to add to the entity collections.
if you want to make sure code is only added to several or just 1 collection, wrap your code in <[If StringValueEquals StringValueName "EntityName"]>
// your code
<[EndIF]>
statements. See the SDK documentation for details.