code: def _extract_field_from_json(
      json_input: dict,
      keys: List[str],
  ) -> Any:
      """Given a dictionary, returns value at specified keys.
  
      Raises:
          KeyError: If a key cannot be found in the json input.
      """
      curr_json = json_input
      for idx, key in enumerate(keys):
          if idx < len(keys) - 1:
              curr_json = curr_json[key]
              continue
          return curr_json[key]
  
imports: from __future__ import absolute_import
  import base64
  import json
  from typing import Any, Dict, List, Optional, Union
  import re
  import boto3
  from sagemaker.jumpstart.accessors import JumpStartS3PayloadAccessor
  from sagemaker.jumpstart.artifacts.payloads import _retrieve_example_payloads
  from sagemaker.jumpstart.constants import DEFAULT_JUMPSTART_SAGEMAKER_SESSION, JUMPSTART_DEFAULT_REGION_NAME
  from sagemaker.jumpstart.enums import MIMEType
  from sagemaker.jumpstart.types import JumpStartSerializablePayload
  from sagemaker.jumpstart.utils import get_jumpstart_content_bucket
  from sagemaker.session import Session
label_desc: Use image node_id 1 for calling a global function with example usage: _extract_field_from_json(json_input, keys) and returns: curr_json