code: def get_status_code(e, details):
      metadata = e.trailing_metadata()
      status_md = [x for x in metadata if is_status_detail(x)]
      if status_md:
          for md in status_md:
              st = status_pb2.Status()
              st.MergeFromString(md.value)
          if st.details:
              val = error_details_pb2.ErrorInfo()
              st.details[0].Unpack(val)
              return val.reason
      return None
  
imports: import functools
  import tempfile
  import os
  from typing import Optional, Dict, Any, List
  import subprocess
  import atexit
  import sys
  import threading
  import grpc
  from google.rpc import status_pb2, error_details_pb2
  from .servicepb.keepsake_pb2_grpc import DaemonStub
  from .servicepb import keepsake_pb2
  from .None import pb_convert
  from .experiment import Experiment
  from .checkpoint import Checkpoint, PrimaryMetric
  from .None import exceptions
  from .None import console
label_desc: Use image node_id 3 for calling a global function with example usage: get_status_code(e, details) and returns: None, val