code: def generate_jid(name, append_date=None):
      
      if not append_date:
          return sanitize_jid(name)
      return '{}-{}'.format(sanitize_jid(name), append_date.strftime('%Y-%m-%d'))
docs: Generates a v alid JID based on the room name.
  
      :param append_date: appends the given date to the JID