def METHOD_NAME(self) -> None:
    """Perform role assumption."""
    if not self.role_arn:
        LOGGER.debug("no role to assume")
        return
    if self.revert_on_exit:
        self.save_existing_iam_env_vars()
    sts_client = self.ctx.get_session().client("sts")
    LOGGER.info("assuming role %s...", self.role_arn)
    response = sts_client.assume_role(**self._kwargs)
    LOGGER.debug("sts.assume_role response: %s", response)
    if "Credentials" in response:
        self.assumed_role_user.update(
            response.get("AssumedRoleUser", cast("AssumedRoleUserTypeDef", {}))
        )
        self.credentials.update(response["Credentials"])
        self.ctx.env.vars.update(
            {
                "AWS_ACCESS_KEY_ID": response["Credentials"]["AccessKeyId"],
                "AWS_SECRET_ACCESS_KEY": response["Credentials"]["SecretAccessKey"],
                "AWS_SESSION_TOKEN": response["Credentials"]["SessionToken"],
            }
        )
        LOGGER.verbose("updated environment with assumed credentials")
    else:
        raise ValueError("assume_role did not return Credentials")