code: def register_credential_provider(
      session: session, provider_name: str
  ) -> None:
      credential_resolver = session.get_component("credential_provider")
      credential_provider = credential_resolver.get_provider(
          provider_name
      )
      managed_credential_provider = RefreshableCredentialProvider(
          check_every=2, credential_provider=credential_provider
      )
      credential_resolver.insert_before(
          name=provider_name,
          credential_provider=managed_credential_provider,
      )
  
imports: import logging
  import os
  import threading
  import time
  from typing import Any
  import boto3
  from botocore import session
  from botocore.compat import ensure_unicode
  from botocore.credentials import CredentialProvider, Credentials, ReadOnlyCredentials, SharedCredentialProvider
  from botocore.session import get_session
label_desc: Use image node_id 1 for calling a global function with example usage: register_credential_provider(session, provider_name) without return types