def format_args(worker, args, kwargs):
    """Format args for various languages.

    Args:
        worker: The global worker instance.
        args: The arguments for cross language.
        kwargs: The keyword arguments for cross language.

    Returns:
        List of args and kwargs (if supported).
    """
    if not worker.load_code_from_local:
        raise ValueError(
            'Cross language feature needs --load-code-from-local to be set.')
    if kwargs:
        raise TypeError(
            'Cross language remote functions does not support kwargs.')
    return args
