def pre_process(session: 'Session', cookies: Any) -> List[Dict[str, Any]]:
    """Load the given cookies to the cookie jar while maintaining
    support for the old cookie layout."""

    is_old_style = isinstance(cookies, dict)
    if is_old_style:
        normalized_cookies = [
            {
                'name': key,
                **value
            }
            for key, value in cookies.items()
        ]
    else:
        normalized_cookies = cookies

    should_issue_warning = is_old_style and any(
        cookie.get('domain', '') == ''
        for cookie in normalized_cookies
    )

    if should_issue_warning:
        warning = INSECURE_COOKIE_JAR_WARNING.format(hostname=session.bound_host, session_id=session.session_id)
        if not session.is_anonymous:
            warning += INSECURE_COOKIE_JAR_WARNING_FOR_NAMED_SESSIONS
        warning += INSECURE_COOKIE_SECURITY_LINK
        session.warn_legacy_usage(warning)

    return normalized_cookies
Load the given cookies to the cookie jar while maintaining
    support for the old cookie layout.
httpie/legacy/v3_1_0_session_cookie_format.py