async def type_cast_payload(schema: dict, payload: dict):
<EOL>cerberus_type_map = {<EOL>'<STR_LIT:string>': str,<EOL>'<STR_LIT>': int,<EOL>'<STR_LIT:float>': float,<EOL>}<EOL>for field, validator in schema.items():<EOL><INDENT>field_type = validator['<STR_LIT:type>']<EOL>if field_type in ['<STR_LIT>', '<STR_LIT:string>', '<STR_LIT:float>']:<EOL><INDENT>payload_value = payload.get(field)<EOL>if not payload_value:<EOL><INDENT>break<EOL><DEDENT>try:<EOL><INDENT>payload[field] = cerberus_type_map[field_type](payload_value)<EOL><DEDENT>except ValueError:<EOL><INDENT>break<EOL><DEDENT><DEDENT><DEDENT>return payload<EOL>
Make schema little forgiving! use case:  multipart data