<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def create_ticket(self, title=None, body=None, subject=None, priority=None):
 """Create a new ticket. :param string title: title for the new ticket :param string body: body for the new ticket :param integer subject: id of the subject to be assigned to the ticket :param integer priority: Value from 1 (highest) to 4 (lowest) """

        current_user = self.account.getCurrentUser()
        new_ticket = {
            'subjectId': subject,
            'contents': body,
            'assignedUserId': current_user['id'],
            'title': title,
        }
        if priority is not None:
            new_ticket['priority'] = int(priority)

        created_ticket = self.ticket.createStandardTicket(new_ticket, body)
        return created_ticket