def get_attrs_declarations(item_type):
<EOL>attribs = fields(item_type)<EOL>res = dict()<EOL>for attr in attribs:<EOL><INDENT>attr_name = attr.name<EOL>optional = is_optional(attr)<EOL>typ = guess_type_from_validators(attr)<EOL>res[attr_name] = (typ, optional)<EOL><DEDENT>return res<EOL>
Helper method to return a dictionary of tuples. Each key is attr_name, and value is (attr_type, attr_is_optional)

:param item_type:
:return: