from typing import Dict


def copy_and_update(target: Dict, updater: Dict) -> Dict:
    """Copy and update dictionary.

    Copy dictionary and update it all in one operation.

    Args:
        target: The dictionary to copy and update.
        updater: The updating dictionary.

    Returns:
        Dict: A new dictionary of the ``target`` copied and
        updated by ``updater``.

    For example::

        >>> a = {'foo': 'bar'}
        >>> b = copy_and_update(a, {1: 2})
        >>> a is b
        False
        >>> b == {'foo': 'bar', 1: 2}
        True
    """
    result = target.copy()
    result.update(updater)
    return result