code: def create_ticket(self, ticket=None, **kwargs):
          
          if not ticket:
              ticket = self.create_ticket_str()
          if 'service' in kwargs:
              kwargs['service'] = clean_service_url(kwargs['service'])
          if 'expires' not in kwargs:
              expires = now() + timedelta(seconds=self.model.TICKET_EXPIRE)
              kwargs['expires'] = expires
          t = self.create(ticket=ticket, **kwargs)
          logger.debug("Created %s %s" % (t.name, t.ticket))
          return t
docs: Create a new ``Ticket``. Additional arguments are passed to the
          ``create()`` function. Return the newly created ``Ticket``.