code: def build_job_metadata(
      channel_id: str,
      job_id: str,
      user_id: Optional[int],
      **kwargs: Any,
  ) -> dict[str, Any]:
      return {
          "channel_id": channel_id,
          "job_id": job_id,
          "user_id": user_id,
          "status": kwargs.get("status"),
          "errors": kwargs.get("errors", []),
          "result_url": kwargs.get("result_url"),
      }
  
imports: import json
  import logging
  import uuid
  from typing import Any, Literal, Optional
  import jwt
  import redis
  from flask import Flask, request, Request, Response, session
  from superset.utils.core import get_user_id
label_desc: Use image node_id 1 for calling a global function with example usage: build_job_metadata(channel_id, job_id, user_id) and returns: dict