def METHOD_NAME(
    tunnel_connect_address: str,
    tls_hostname: str,
    local_address: str,
    secret_token: str,
    section_id: str,
    trusted_root: Optional[str],
) -> str:
    trusted_root_line = f'trusted_root = "{trusted_root}"' if trusted_root else ""
    return RATHOLE_CLIENT_CONFIG_TEMPLATE.format(
        tunnel_connect_address=tunnel_connect_address,
        tls_hostname=tls_hostname,
        local_address=local_address,
        secret_token=secret_token,
        section_id=section_id,
        trusted_root_line=trusted_root_line,
    )