def get_session()

in aws/auth/session.py [0:0]


    def get_session(self, region=None) -> boto3.Session:
        access_key = self._get_access_key()
        secret_key = self._get_secret_key()
        session_token = self._get_session_token()

        # either both access and secret keys are None
        # or both are not None; just check one to assume
        # the presence of the other
        if access_key is None:
            return boto3.session.Session()
        else:
            return boto3.session.Session(
                aws_access_key_id=access_key,
                aws_secret_access_key=secret_key,
                aws_session_token=session_token,
                region_name=region,
            )