<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def attach_hardware(self, ticket_id=None, hardware_id=None):
 """Attach hardware to a ticket. :param integer ticket_id: the id of the ticket to attach to :param integer hardware_id: the id of the hardware to attach :returns: dict -- The new ticket attachment """

        return self.ticket.addAttachedHardware(hardware_id, id=ticket_id)