def METHOD_NAME(self, **kwargs: Any) -> AssumedRole:
    del kwargs["principal_arn"]
    saml_assertion_encoded = kwargs.pop("saml_assertion")
    saml_assertion_decoded = b64decode(saml_assertion_encoded)
    namespaces = {
        "urn:oasis:names:tc:SAML:2.0:protocol": "samlp",
        "urn:oasis:names:tc:SAML:2.0:assertion": "saml",
    }
    saml_assertion = xmltodict.parse(
        saml_assertion_decoded.decode("utf-8"),
        force_cdata=True,
        process_namespaces=True,
        namespaces=namespaces,
        namespace_separator="|",
    )
    target_role = None
    saml_assertion_attributes = saml_assertion["samlp|Response"]["saml|Assertion"][
        "saml|AttributeStatement"
    ]["saml|Attribute"]
    for attribute in saml_assertion_attributes:
        if (
            attribute["@Name"]
            == "https://aws.amazon.com/SAML/Attributes/RoleSessionName"
        ):
            kwargs["role_session_name"] = attribute["saml|AttributeValue"]["#text"]
        if (
            attribute["@Name"]
            == "https://aws.amazon.com/SAML/Attributes/SessionDuration"
        ):
            kwargs["duration"] = int(attribute["saml|AttributeValue"]["#text"])
        if attribute["@Name"] == "https://aws.amazon.com/SAML/Attributes/Role":
            target_role = attribute["saml|AttributeValue"]["#text"].split(",")[0]
    if "duration" not in kwargs:
        kwargs["duration"] = DEFAULT_STS_SESSION_DURATION
    account_id, access_key = self._create_access_key(role=target_role)  # type: ignore
    kwargs["account_id"] = account_id
    kwargs["access_key"] = access_key
    kwargs["external_id"] = None
    kwargs["policy"] = None
    role = AssumedRole(**kwargs)
    self.assumed_roles.append(role)
    return role