code: def init_bedrock_client(
      region_name=None,
      aws_access_key_id: Optional[str] = None,
      aws_secret_access_key: Optional[str] = None,
      aws_region_name: Optional[str] = None,
      aws_bedrock_runtime_endpoint: Optional[str] = None,
  ):
      # check for custom AWS_REGION_NAME and use it if not passed to init_bedrock_client
      litellm_aws_region_name = get_secret("AWS_REGION_NAME", None)
      standard_aws_region_name = get_secret("AWS_REGION", None)
  
      ## CHECK IS  'os.environ/' passed in
      # Define the list of parameters to check
      params_to_check = [
          aws_access_key_id,
          aws_secret_access_key,
          aws_region_name,
          aws_bedrock_runtime_endpoint,
      ]
  
      # Iterate over parameters and update if needed
      for i, param in enumerate(params_to_check):
          if param and param.startswith("os.environ/"):
              params_to_check[i] = get_secret(param)
      # Assign updated values back to parameters
      (
          aws_access_key_id,
          aws_secret_access_key,
          aws_region_name,
          aws_bedrock_runtime_endpoint,
      ) = params_to_check
      if region_name:
          pass
      elif aws_region_name:
          region_name = aws_region_name
      elif litellm_aws_region_name:
          region_name = litellm_aws_region_name
      elif standard_aws_region_name:
          region_name = standard_aws_region_name
      else:
          raise BedrockError(
              message="AWS region not set: set AWS_REGION_NAME or AWS_REGION env variable or in .env file",
              status_code=401,
          )
  
      # check for custom AWS_BEDROCK_RUNTIME_ENDPOINT and use it if not passed to init_bedrock_client
      env_aws_bedrock_runtime_endpoint = get_secret(
          "AWS_BEDROCK_RUNTIME_ENDPOINT"
      )
      if aws_bedrock_runtime_endpoint:
          endpoint_url = aws_bedrock_runtime_endpoint
      elif env_aws_bedrock_runtime_endpoint:
          endpoint_url = env_aws_bedrock_runtime_endpoint
      else:
          endpoint_url = (
              f"https://bedrock-runtime.{region_name}.amazonaws.com"
          )
  
      import boto3
  
      if aws_access_key_id != None:
          # uses auth params passed to completion
          # aws_access_key_id is not None, assume user is trying to auth using litellm.completion
  
          client = boto3.client(
              service_name="bedrock-runtime",
              aws_access_key_id=aws_access_key_id,
              aws_secret_access_key=aws_secret_access_key,
              region_name=region_name,
              endpoint_url=endpoint_url,
          )
      else:
          # aws_access_key_id is None, assume user is trying to auth using env variables
          # boto3 automatically reads env variables
  
          client = boto3.client(
              service_name="bedrock-runtime",
              region_name=region_name,
              endpoint_url=endpoint_url,
          )
  
      return client
  
imports: import json, copy, types
  import os
  from enum import Enum
  import time
  from typing import Callable, Optional, Any, Union
  import litellm
  from litellm.utils import ModelResponse, get_secret, Usage
  from .prompt_templates.factory import prompt_factory, custom_prompt
  import httpx
label_desc: Use image node_id 1 for calling a global function with example usage: init_bedrock_client(region_name, aws_access_key_id, aws_secret_access_key, aws_region_name, aws_bedrock_runtime_endpoint) and returns: client