code: def check_credentials():
      """Check for valid AWS credentials in environment variables
  
      Returns:
          bool: True any of the AWS env variables exist
      """
      try:
          response = boto3.client("sts").get_caller_identity()
      except NoCredentialsError:
          LOGGER.error(
              "No valid AWS Credentials found in your environment!"
          )
          LOGGER.error(
              "Please follow the setup instructions here: "
              "https://www.streamalert.io/getting-started.html"
              "#configure-aws-credentials"
          )
          return False
      except ClientError as err:
          # Check for an error related to an expired token
          if err.response["Error"]["Code"] == "ExpiredToken":
              LOGGER.error(
                  "%s. Please refresh your credentials.",
                  err.response["Error"]["Message"],
              )
              return False
          raise  # Raise the error if it is anything else
  
      LOGGER.debug(
          "Using credentials for user '%s' with user ID '%s' in account "
          "'%s'",
          response["Arn"],
          response["UserId"],
          response["Account"],
      )
  
      return True
  
file_path: streamalert/streamalert_cli/helpers.py
imports: from getpass import getpass
  import json
  import os
  import re
  import subprocess
  import boto3
  from botocore.exceptions import ClientError, NoCredentialsError
  from streamalert.shared.logger import get_logger
label_desc: Use image node_id 3 for calling a global function with example usage: check_credentials() and returns: True, False, False