old_contents: import copy
  
  DEFAULTS = {
      'driver': {
          'typename': 'bibliopixel.drivers.SimPixel.DriverSimPixel',
          'num': 1024
      },
  
      'led': {
          'typename': 'bibliopixel.led.matrix.LEDMatrix',
          'width': 32,
          'height': 32,
      },
  
      'animation': {
          'typename': 'BiblioPixelAnimations.matrix.bloom.Bloom'
      },
  
      'maker': {},
      'run': {},
  }
  
  SECTIONS = tuple(sorted(DEFAULTS.keys()))
  
  
  def apply_defaults(desc):
      result = copy.deepcopy(DEFAULTS)
      for k, v in desc.items():
          if isinstance(v, str):
              result[k]['typename'] = v
          else:
              result[k].update(v)
  
      return result
  
new_contents: import copy
  
  from . aliases import resolve_aliases
  
  DEFAULTS = {
      'driver': {
          'typename': 'bibliopixel.drivers.SimPixel.DriverSimPixel',
          'num': 1024
      },
  
      'led': {
          'typename': 'bibliopixel.led.matrix.LEDMatrix',
          'width': 32,
          'height': 32,
      },
  
      'animation': {
          'typename': 'BiblioPixelAnimations.matrix.bloom.Bloom'
      },
  
      'maker': {},
      'run': {},
  }
  
  SECTIONS = tuple(sorted(DEFAULTS.keys()))
  
  
  def merge(default, *others):
      result = copy.deepcopy(default)
      for o in others:
          for k, v in o.items():
              result[k].update(v)
  
      return result
  
  
  def apply_defaults(desc):
      return merge(DEFAULTS, resolve_aliases(desc))
  
subject: Simplify defaults slightly.