A service factory can be used for creating instances where a non-trivial construction process is required. This is done by adding a `factory` key to the service definition.