def import_extension(dest, src, name, api=None, profile=None,
                     filter_symbol=None):
    """Imports Extension `name`, and all its dependencies.

    :param Registry dest: Destination Registry
    :param Registry src: Source Registry
    :param str name: Name of Extension to import
    :param str api: Prefer to import types with API name `api`,
                or None to prefer Types with no API name.
    :type api: str
    :param filter_symbol: Optional symbol filter callable
    :type filter_symbol: Callable with signature
                         ``(symbol_type:str, symbol_name:str) -> bool``
    """
    if filter_symbol is None:
        filter_symbol = _default_filter_symbol
    ext = src.extensions[name] if isinstance(name, str) else name
    for req in ext.get_requires(api, profile):
        for x in req.types:
            if not filter_symbol('type', x):
                continue
            import_type(dest, src, x, api, filter_symbol)
        for x in req.enums:
            if not filter_symbol('enum', x):
                continue
            import_enum(dest, src, x)
        for x in req.commands:
            if not filter_symbol('command', x):
                continue
            import_command(dest, src, x, api, filter_symbol)
    dest.extensions[name] = ext
Imports Extension `name`, and all its dependencies.

    :param Registry dest: Destination Registry
    :param Registry src: Source Registry
    :param str name: Name of Extension to import
    :param str api: Prefer to import types with API name `api`,
                or None to prefer Types with no API name.
    :type api: str
    :param filter_symbol: Optional symbol filter callable
    :type filter_symbol: Callable with signature
                         ``(symbol_type:str, symbol_name:str) -> bool``