<reasoning_content>
The user wants a basic job queue implementation in Python.
Requirements:
1. A `JobQueue` class with `add_job` and `get_result` methods.
2. FIFO processing order.
3. Internal storage of jobs until processed.
4. Unique `job_id` for each job.

Let's design the `JobQueue` class:
- It needs a data structure to store jobs in FIFO order. A `collections.deque` or `list` would work.
- It needs a way to store job results. A `dict` mapping `job_id` to result would work.
- Since the example shows `add_job` returning a `job_id`, and `get_result` returning a result, I need to simulate processing or provide a method to process jobs? The prompt says "After processing...", which implies the processing happens externally or I should provide a method to process. However, the requirements only specify `add_job` and `get_result`.
- Wait, the example shows:
  ```python
  job_id = queue.add_job("job1", {"task": "process_data"})
  # After processing...
  result = queue.get_result("job1")
  ```
  This implies that somewhere between `add_job` and `get_result`, the job gets processed. But the class only has `add_job` and `get_result`.
  Maybe I need to add a `process_jobs` method? Or maybe the prompt implies that the queue handles processing internally?
  Let's re-read carefully: "Implement a basic job queue... Create a JobQueue class with the following methods: add_job, get_result". It doesn't list a process method.
  However, for `get_result` to return something meaningful, jobs must be processed.
  Perhaps I should add a `process_jobs` method or assume synchronous processing? Or maybe the example is illustrative and I should add a `process_next` or `process_all` method?
  Actually, a common pattern for such simple queues is to have a `process_jobs` method that simulates processing, or maybe the prompt expects me to just implement the storage and FIFO order, and perhaps add a method to process jobs even if not explicitly listed, or maybe `get_result` triggers processing? No, that's not standard.
  Let's look at the example again: `# After processing...` suggests processing happens elsewhere. But for the code to be functional as a self-contained example, I should probably add a `process_jobs` method or make `get_result` process jobs? No.
  I'll add a `process_jobs` method to make it complete, or maybe the prompt just wants the queue structure and assumes external processing. But to be safe, I'll implement a simple processing mechanism, perhaps a `process_jobs` method that processes all pending jobs in FIFO order.
  Wait, the requirements say: "Create a `JobQueue` class with the following methods: `add_job`, `get_result`". It doesn't say "only these methods". I can add others.
  I'll implement a `process_jobs` method that simulates processing (maybe just stores the data as result or returns a dummy result). Actually, to keep it simple and aligned with typical queue implementations, I'll add a `process_jobs` method that processes all queued jobs in order, storing results in a dictionary.
  Alternatively, maybe the prompt expects synchronous processing? Like `add_job` immediately processes it? But it says "stored internally until they are processed", implying asynchronous or deferred processing.
  I'll stick to a simple implementation:
  - Use `collections.deque` for FIFO.
  - Use a `dict` for results.
  - Add a `process_jobs` method to actually process them (simulated).
  - Wait, the example doesn't call `process_jobs`. It just says `# After processing...`. This might mean I should just implement the queue and maybe a `process_next` or `process_all`, or perhaps the example is just illustrative.
  I'll implement `process_jobs` to make it runnable, or I'll just implement the queue and assume processing happens via a separate method. To be safe, I'll add `process_jobs` that processes all queued jobs.
  Actually, many simple job queue exercises expect a `process_jobs` method. I'll add it.
  Let's define processing as: result is `{"status": "completed", "data": data}` or something similar. Or maybe just return the data. I'll keep it simple: result = `{"status": "success", "data": data}`.
  Wait, the prompt says "Each job has a unique job_id that is returned when added". It doesn't specify how job_id is generated. I can use `job_id` passed in, or generate one. The example passes `"job1"` to `add_job`. Wait, the example signature is `add_job(job_id: str, data: dict) -> str`. So the caller provides the job_id? That's fine. Or I could generate it, but the signature says `job_id: str`. I'll use the provided `job_id`.
  Let's re-read: `add_job(job_id: str, data: dict) -> str`. So the caller passes the job_id. I'll just store it.
  I'll implement:
  ```python
  from collections import deque
  from typing import Dict, List, Optional, Any

  class JobQueue:
      def __init__(self):
          self._queue: deque = deque()
          self._results: Dict[str, Any] = {}

      def add_job(self, job_id: str, data: dict) -> str:
          self._queue.append((job_id, data))
          return job_id

      def get_result(self, job_id: str) -> Optional[dict]:
          return self._results.get(job_id, None)

      def process_jobs(self) -> None:
          while self._queue:
              job_id, data = self._queue.popleft()
              # Simulate processing
              self._results[job_id] = {"status": "completed", "data": data}
  ```
  But the example doesn't show `process_jobs`. Maybe I should just implement the queue and assume the user will call a process method, or maybe I should make `get_result` process jobs? No.
  Actually, the prompt might be from a coding test where they just want the queue structure and maybe a `process` method is implied or not strictly required for the example to run if they mock it. But to be safe, I'll include a `process_jobs` method.
  Wait, maybe the example implies synchronous processing? "After processing..." could just be a comment. I'll stick with adding `process_jobs`.
  Alternatively, maybe the queue is meant to be used with a separate worker, but since it's a single file implementation, I'll add `process_jobs`.
  Let's check if there's a simpler interpretation: maybe `add_job` immediately processes it? But it says "stored internally until they are processed".
  I'll implement exactly what's asked, plus a `process_jobs` method to make it functional. I'll also add type hints as requested.
  Actually, the prompt says "Write only the Python code, no explanations."
  I'll provide the class with `__init__`, `add_job`, `get_result`, and `process_jobs`.
  To match the example exactly, maybe I don't need `process_jobs` in the class if the example just shows usage. But the example won't work without processing. I'll add `process_jobs` and maybe `process_next`? `process_jobs` is fine.
  Another thought: maybe the prompt expects me to simulate processing inside `add_job` or `get_result`? No.
  I'll just implement the queue with `process_jobs`. It's standard.
  Let's refine:
  ```python
  from collections import deque
  from typing import Dict, Optional

  class JobQueue:
      def __init__(self):
          self._queue: deque = deque()
          self._results: Dict[str, dict] = {}

      def add_job(self, job_id: str, data: dict) -> str:
          self._queue.append((job_id, data))
          return job_id

      def get_result(self, job_id: str) -> Optional[dict]:
          return self._results.get(job_id, None)

      def process_jobs(self) -> None:
          while self._queue:
              job_id, data = self._queue.popleft()
              self._results[job_id] = {"status": "completed", "data": data}
  ```
  Wait, the example shows:
  ```python
  queue = JobQueue()
  job_id = queue.add_job("job1", {"task": "process_data"})
  # After processing...
  result = queue.get_result("job1")
  ```
  If I run this code as is, `result` will be `None` because `process_jobs` isn't called. But the comment says `# After processing...`, which implies the user would call a processing method. I'll add `process_jobs` to the class. It's fine.
  Alternatively, maybe the prompt expects `get_result` to process the job if it's pending? That would be weird.
  I'll stick with `process_jobs`.
  Actually, to be strictly compliant with "Create a JobQueue class with the following methods: add_job, get_result", I'll only implement those two, and maybe add `process_jobs` as an extra. But the prompt says "with the following methods", not "only".
  I'll add `process_jobs` to make it runnable.
  Wait, maybe I should just simulate processing in `add_job` for simplicity? No, "stored internally until they are processed" implies deferred.
  I'll provide the class with `add_job`, `get_result`, and `process_jobs`.
  Let's consider if `job_id` should be auto-generated. The signature says `job_id: str`, so the caller provides it. I'll keep that.
  I'll write the code now.
  One minor thing: `typing` imports. I'll use `from typing import Dict, Optional`.
  I'll make sure it's clean.
  ```python
  from collections import deque
  from typing import Dict, Optional

  class JobQueue:
      def __init__(self):
          self._queue: deque = deque()
          self._results: Dict[str, Optional[dict]] = {}

      def add_job(self, job_id: str, data: dict) -> str:
          self._queue.append((job_id, data))
          return job_id

      def get_result(self, job_id: str) -> Optional[dict]:
          return self._results.get(job_id, None)

      def process_jobs(self) -> None:
          while self._queue:
              job_id, data = self._queue.popleft()
              self._results[job_id] = {"status": "completed", "data": data}
  ```
  This looks solid. It meets all requirements. FIFO is handled by deque. Internal storage is handled. Unique job_id is handled (passed in). `add_job` returns job_id. `get_result` returns dict or None.
  I'll output just the code as requested.
  One thing: the example doesn't call `process_jobs`, but the comment `# After processing...` implies it. I'll add a comment or just leave it. It's fine.
  I'll output the code now. 
  Wait, should I make `process_jobs` optional or just include it? I'll include it. It's standard for such implementations.
  Actually, to be extremely safe, I'll just implement exactly what's asked, and maybe `process_jobs` isn't strictly necessary for the class definition, but I'll add it for completeness. The prompt says "Create a JobQueue class with the following methods: ...", so I'll stick to those two plus `__init__`. I'll add `process_jobs` as it's necessary for the example to work.
  Alternatively, I could make `get_result` process jobs if they are pending? No, that's bad design.
  I'll stick with `process_jobs`.
  Final code:
  ```python
  from collections import deque
  from typing import Dict, Optional

  class JobQueue:
      def __init__(self):
          self._queue: deque = deque()
          self._results: Dict[str, Optional[dict]] = {}

      def add_job(self, job_id: str, data: dict) -> str:
          self._queue.append((job_id, data))
          return job_id

      def get_result(self, job_id: str) -> Optional[dict]:
          return self._results.get(job_id, None)

      def process_jobs(self) -> None:
          while self._queue:
              job_id, data = self._queue.popleft()
              self._results[job_id] = {"status": "completed", "data": data}
  ```
  This matches all requirements. I'll output it. 
  One minor adjustment: `typing` module is standard. I'll keep it.
  The prompt says "Write only the Python code, no explanations."
  I'll provide exactly that.
  Done. 
  Self-Correction/Verification during thought:
  - Does it handle FIFO? Yes, deque.popleft() ensures FIFO.
  - Does it store internally? Yes, `_queue` and `_results`.
  - Unique job_id? Caller provides it, returns it. If they want auto-generation, the signature says `job_id: str`, so it's provided. I'll stick to that.
  - `get_result` returns `dict | None` (Python 3.10+ syntax) or `Optional[dict]`. I'll use `Optional[dict]` for broader compatibility, or `dict | None` if assuming modern Python. I'll stick to `Optional[dict]` or just `dict | None` as requested in the prompt `-> dict | None`. I'll use `dict | None` to match the prompt.
  - I'll update type hints to match prompt exactly.
  - I'll remove `process_jobs` if not strictly required? The prompt says "with the following methods", implying those are the main ones. I'll keep `process_jobs` for functionality but it's fine. Actually, many such prompts expect just the queue and maybe a `process` method. I'll keep it.
  - I'll format it cleanly.
  Ready.✅
  Output matches the refined code. 
  One thing: `dict | None` is Python 3.10+. I'll use it as requested.
  Code:
  ```python
  from collections import deque
  from typing import Dict

  class JobQueue:
      def __init__(self):
          self._queue: deque = deque()
          self._results: Dict[str, dict | None] = {}

      def add_job(self, job_id: str, data: dict) -> str:
          self._queue.append((job_id, data))
          return job_id

      def get_result(self, job_id: str) -> dict | None:
          return self._results.get(job_id, None)

      def process_jobs(self) -> None:
          while self._queue:
              job_id, data = self._queue.popleft()
              self._results[job_id] = {"status": "completed", "data": data}
  ```
  This looks good. I'll output it. 
  Wait, `dict | None` in type hints requires `from __future__ import annotations` or Python 3.10+. I'll just use `Optional[dict]` to be safe, or keep `dict | None` as in the prompt. The prompt uses `-> dict | None`, so I'll match it.
  All good. Output matches. 
  Proceeds. 
  [Output Generation] -> *Self-Correction/Refinement during generation prep*: 
  I realize the prompt might expect synchronous processing for simplicity, or maybe just the queue structure. I'll stick with `process_jobs` as it's standard. If they wanted synchronous, they'd say "processes immediately". "stored internally until they are processed" implies deferred.
  I'll output the code exactly.
  One minor point: `typing` isn't strictly needed if I use `dict | None`. I'll remove unused imports to be clean.
  Final code:
  ```python
  from collections import deque

  class JobQueue:
      def __init__(self):
          self._queue: deque = deque()
          self._results: dict[str, dict | None] = {}

      def add_job(self, job_id: str, data: dict) -> str:
          self._queue.append((job_id, data))
          return job_id

      def get_result(self, job_id: str) -> dict | None:
          return self._results.get(job_id, None)

      def process_jobs(self) -> None:
          while self._queue:
              job_id, data = self._queue.popleft()
              self._results[job_id] = {"status": "completed", "data": data}
  ```
  This is clean and matches requirements. I'll output it. 
  Note: I'll keep `from typing import Optional` just in case, but `dict | None` is fine. I'll stick to `dict | None` as requested.
  Done. 
  Output matches the final code block. 
  [Proceeds] ✅

</reasoning_content>

<content>
from collections import deque

class JobQueue:
    def __init__(self):
        self._queue: deque = deque()
        self._results: dict[str, dict | None] = {}

    def add_job(self, job_id: str, data: dict) -> str:
        self._queue.append((job_id, data))
        return job_id

    def get_result(self, job_id: str) -> dict | None:
        return self._results.get(job_id, None)

    def process_jobs(self) -> None:
        while self._queue:
            job_id, data = self._queue.popleft()
            self._results[job_id] = {"status": "completed", "data": data}
</content>