Decorator for 'shared' configurables
A shared configurable is written as:
@shared
@configurable
def make_something(...):
pass
It has the following properties:
- Each call receives the same argument values as the first call.
- Each call returns an object that has been configured identically to that returned by the first call.
The use case is for defining 'common objects' in the reconstruction or selection which individual lines should not modify. They allow authors to signal their intent that all callers of the shared configurable will receive 'the same thing' (in the sense of the configuration tree of the returned thing), whilst still allowing a single configuration of that configurable, e.g. in some global settings file.
1 is straightforward. 2 might be harder because we don't know if a configuration tree is the same as another until deduplication time.