code: def test_build_credentials_block(self, mock_session):
      access_key = "aws_access_key_id"
      secret_key = "aws_secret_access_key"
      token = "aws_secret_token"
      mock_session.return_value = Session(access_key, secret_key)
      mock_session.return_value.access_key = access_key
      mock_session.return_value.secret_key = secret_key
      mock_session.return_value.token = None
  
      credentials_block = build_credentials_block(
          mock_session.return_value
      )
  
      assert access_key in credentials_block
      assert secret_key in credentials_block
      assert token not in credentials_block
  
imports: from __future__ import annotations
  from unittest import mock
  from boto3.session import Session
  from airflow.providers.amazon.aws.utils.redshift import build_credentials_block
label_desc: Use image node_id 1 for calling the TestS3ToRedshiftTransfer obj's underlying member method code with example usage: obj.test_build_credentials_block(mock_session) without return types