code: def _get_sts_token(self):
          
          logger.debug("Connecting to STS in region %s", self.region)
          sts = boto3.client('sts', region_name=self.region)
          arn = "arn:aws:iam::%s:role/%s" % (self.account_id, self.account_role)
          logger.debug("STS assume role for %s", arn)
          assume_kwargs = {
              'RoleArn': arn,
              'RoleSessionName': 'awslimitchecker'
          }
          if self.external_id is not None:
              assume_kwargs['ExternalId'] = self.external_id
          if self.mfa_serial_number is not None:
              assume_kwargs['SerialNumber'] = self.mfa_serial_number
          if self.mfa_token is not None:
              assume_kwargs['TokenCode'] = self.mfa_token
          role = sts.assume_role(**assume_kwargs)
  
          creds = ConnectableCredentials(role)
          creds.account_id = self.account_id
  
          logger.debug("Got STS credentials for role; access_key_id=%s "
                       "(account_id=%s)", creds.access_key, creds.account_id)
          return creds
docs: Assume a role via STS and return the credentials.
  
          First connect to STS via :py:func:`boto3.client`, then
          assume a role using `boto3.STS.Client.assume_role <https://boto3.readthe
          docs.org/en/latest/reference/services/sts.html#STS.Client.assume_role>`_
          using ``self.account_id`` and ``self.account_role`` (and optionally
          ``self.external_id``, ``self.mfa_serial_number``, ``self.mfa_token``).
          Return the resulting :py:class:`~.ConnectableCredentials`
          object.
  
          :returns: STS assumed role credentials
          :rtype: :py:class:`~.ConnectableCredentials`