code: def _get_dockerhub_credentials(
      secret_name: str,
      secret_endpoint_url: str,
      secret_endpoint_region_name: str,
  ):
      import boto3
      import botocore
  
      session = boto3.Session()
      client = session.client(
          service_name="secretsmanager",
          region_name=secret_endpoint_region_name,
          endpoint_url=secret_endpoint_url,
      )
      try:
          get_secret_value_response = client.get_secret_value(
              SecretId=secret_name
          )
      except botocore.exceptions.ClientError as client_error:
          if (
              client_error.response["Error"]["Code"]
              == "ResourceNotFoundException"
          ):
              logging.exception(
                  "The requested secret %s was not found", secret_name
              )
          elif (
              client_error.response["Error"]["Code"]
              == "InvalidRequestException"
          ):
              logging.exception("The request was invalid due to:")
          elif (
              client_error.response["Error"]["Code"]
              == "InvalidParameterException"
          ):
              logging.exception("The request had invalid params:")
          raise
      else:
          secret = get_secret_value_response["SecretString"]
          secret_dict = json.loads(secret)
          return secret_dict
  
file_path: mxnet/ci/docker_login.py
imports: import argparse
  import json
  import logging
  import os
  import subprocess
  import sys
  from util import retry, config_logging
label_desc: Use image node_id 1 for calling a global function with example usage: _get_dockerhub_credentials(secret_name, secret_endpoint_url, secret_endpoint_region_name) and returns: secret_dict