transform(
data: _T,
expected_type: object,
) -> _TTransform dictionaries based off of type information from the given type, for example:
class Params(TypedDict, total=False):
card_id: Required[Annotated[str, PropertyInfo(alias="cardID")]]
transformed = transform({"card_id": "<my card ID>"}, Params)
# {'cardID': '<my card ID>'}
Any keys / data that does not have type information given will be included as is.
It should be noted that the transformations that this function does are not represented in the type system.