def copyDisplayProperties(displayCtx, src, dest, displayExclude=None,
    optExclude=None, displayArgs=None, optArgs=None):
    """Copies all properties from the ``src`` :class:`.Display` and
    :class:`.DisplayOpts` instances to the ``dest`` instances.

    :arg displayCtx:     The :class:`.DisplayContext`

    :arg displayExclude: Collection of :class:`.Display` properties which
                         should not be copied

    :arg optExclude:     Collection of :class:`.DisplayOpts` properties which
                         should not be copied

    :arg displayArgs:    Values to be used instead of the ``src`` ``Display``
                         values.

    :arg optArgs:        Values to be used instead of the ``src``
                         ``DisplayOpts`` values.
    """
    if displayExclude is None:
        displayExclude = []
    if optExclude is None:
        optExclude = []
    if displayArgs is None:
        displayArgs = {}
    if optArgs is None:
        optArgs = {}
    srcDisplay = displayCtx.getDisplay(src)
    destDisplay = displayCtx.getDisplay(dest)
    for prop in srcDisplay.getAllProperties()[0]:
        if prop in displayExclude:
            continue
        if not srcDisplay.propertyIsEnabled(prop
            ) or not destDisplay.propertyIsEnabled(prop):
            continue
        val = displayArgs.get(prop, getattr(srcDisplay, prop))
        if prop == 'overlayType':
            choices = destDisplay.getProp('overlayType').getChoices(destDisplay
                )
            if val not in choices:
                continue
        setattr(destDisplay, prop, val)
    srcOpts = displayCtx.getOpts(src)
    destOpts = displayCtx.getOpts(dest)
    for prop in srcOpts.getAllProperties()[0]:
        if prop in optExclude:
            continue
        if not hasattr(destOpts, prop):
            continue
        if not srcOpts.propertyIsEnabled(prop
            ) or not destOpts.propertyIsEnabled(prop):
            continue
        val = optArgs.get(prop, getattr(srcOpts, prop))
        setattr(destOpts, prop, val)
