code: def log_batch_dict_to_proto(log_json: dict) -> LogBatch:
      """Converts a dict containing a batch of logs to a LogBatch proto."""
      return LogBatch(
          ip=log_json.get("ip"),
          # Cast to support string pid like "gcs".
          pid=str(log_json.get("pid")) if log_json.get("pid") else None,
          # Job ID as a hex string.
          job_id=log_json.get("job"),
          is_error=bool(log_json.get("is_err")),
          lines=log_json.get("lines"),
          actor_name=log_json.get("actor_name"),
          task_name=log_json.get("task_name"),
      )
  
label_desc: Use image node_id 1 for calling a global function with example usage: log_batch_dict_to_proto(log_json) and returns: LogBatch