def to_dict(self):
dict_with_nones = self._asdict()<EOL>codedeploy_lambda_alias_update_dict = dict((k, v) for k, v in dict_with_nones.items()<EOL>if v != ref(None) and v is not None)<EOL>return {'<STR_LIT>': codedeploy_lambda_alias_update_dict}<EOL>
:return: a dict that can be used as part of a cloudformation template