<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def handle_property(self, obj):
 """Handle a property event. This function will set an attribute on an object if the event requires it. :param obj: A :py:class:`~turberfield.dialogue.model.Model.Property` object. :return: The supplied object. """

        if obj.object is not None:
            try:
                setattr(obj.object, obj.attr, obj.val)
            except AttributeError as e:
                self.log.error(". ".join(getattr(e, "args", e) or e))
            try:
                print(
                    "{t.dim}{obj.object._name}.{obj.attr} = {obj.val!s}{t.normal}".format(
                        obj=obj, t=self.terminal
                    ),
                    end="\n" * 2,
                    file=self.terminal.stream
                )
            except AttributeError as e:
                self.log.error(". ".join(getattr(e, "args", e) or e))
        return obj