<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def primitive(self):
 """Entry as Python primitive."""

        primitive = {}
        if self.entry_number is not None:
            primitive['entry-number'] = self.entry_number

        if self.item_hash is not None:
            primitive['item-hash'] = self.item_hash

        primitive['timestamp'] = self.timestamp.strftime(fmt)
        return primitive