code: def get_secret():
      secret_name = os.environ["CD_PYPI_SECRET_NAME"]
      endpoint_url = os.environ["DOCKERHUB_SECRET_ENDPOINT_URL"]
      region_name = os.environ["DOCKERHUB_SECRET_ENDPOINT_REGION"]
  
      session = boto3.Session()
      client = session.client(
          service_name="secretsmanager",
          region_name=region_name,
          endpoint_url=endpoint_url,
      )
  
      try:
          get_secret_value_response = client.get_secret_value(
              SecretId=secret_name
          )
      except ClientError as e:
          if (
              e.response["Error"]["Code"]
              == "DecryptionFailureException"
          ):
              raise e
          elif (
              e.response["Error"]["Code"]
              == "InternalServiceErrorException"
          ):
              raise e
          elif (
              e.response["Error"]["Code"] == "InvalidParameterException"
          ):
              raise e
          elif e.response["Error"]["Code"] == "InvalidRequestException":
              raise e
          elif (
              e.response["Error"]["Code"] == "ResourceNotFoundException"
          ):
              raise e
      else:
          return json.loads(get_secret_value_response["SecretString"])
  
file_path: mxnet/cd/python/pypi/pypi_publish.py
imports: import json
  import logging
  import os
  import subprocess
  import sys
  import boto3
  from botocore.exceptions import ClientError
label_desc: Use image node_id 2 for calling a global function with example usage: get_secret() and returns: json