<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_intercom_data(self):
 """Specify the data sent to Intercom API according to event type"""

        data = {
            "event_name": self.get_type_display(),  # event type
            "created_at": calendar.timegm(self.created.utctimetuple()),  # date
            "metadata": self.metadata
        }
        if self.user:
            data["user_id"] = self.user.intercom_id
        return data