code: def get_status(self, experiment_id: str) -> BeakerStatus:
      command = ["beaker", "experiment", "inspect", experiment_id]
      experiment_json = subprocess.check_output(command)
  
      # Example output from beaker.
      # brendanr.local$ beaker experiment inspect ex_g7knlblsjxxk
      # [
      #     {
      #         "id": "ex_g7knlblsjxxk",
      #         "owner": {
      #             "id": "us_a4hw8yvr3xut",
      #             "name": "ai2",
      #             "displayName": "AI2"
      #         },
      #         "author": {
      #             "id": "us_hl8x796649u9",
      #             "name": "brendanr",
      #             "displayName": "Brendan Roof"
      #         },
      #         "workspace": "",
      #         "user": {
      #             "id": "",
      #             "name": "",
      #             "displayName": ""
      #         },
      #         "nodes": [
      #             {
      #                 "name": "training",
      #                 "task_id": "",
      #                 "taskId": "tk_64wm85lc3f0m",
      #                 "result_id": "",
      #                 "resultId": "ds_du02un92r57b",
      #                 "status": "initializing",
      #                 "child_task_ids": null,
      #                 "childTaskIds": [],
      #                 "parent_task_ids": null,
      #                 "parentTaskIds": []
      #             }
      #         ],
      #         "created": "2019-09-25T02:03:30.820437Z",
      #         "archived": false
      #     }
      # ]
  
      experiment_data = json.loads(experiment_json)
      # Beaker lets there be multiple tasks in a single experiment. Here we
      # just try to handle the simple case of single task experiments like
      # those created by run_with_beaker.py.
      assert (
          len(experiment_data) == 1
      ), "Experiment not created with run_with_beaker.py"
      assert (
          len(experiment_data[0]["nodes"]) == 1
      ), "Experiment not created with run_with_beaker.py"
      status = BeakerStatus(experiment_data[0]["nodes"][0]["status"])
      # Small delay to avoid thrashing Beaker.
      time.sleep(BEAKER_QUERY_INTERVAL_SECONDS)
      return status
  
imports: import argparse
  import json
  import logging
  import os
  import random
  import sqlite3
  import subprocess
  import time
  from enum import Enum
  from logging.handlers import RotatingFileHandler
  from sqlite3 import Connection
  from subprocess import PIPE
label_desc: Use image node_id 1 for calling the BeakerWrapper obj's underlying member method code with example usage: obj.get_status(experiment_id) and returns: status