This is a pretty involved data structure, and should be probably extracted out into a constant. We could do something like this:

```ruby

# @api private
def self.build_custom_modules
  data = {}
  # construct hash
  data
end

CUSTOM_MODULES = build_custom_modules()
```

Then the actual `module(name)` behavior would just merge in the default values and the custom module behavior defined above.