<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(self, username, password, roles, **params):
 """Creates a new user. This function makes two roundtrips to the server, plus at most two more if the ``autologin`` field of :func:`connect` is set to ``True``. :param username: The username. :type username: ``string`` :param password: The password. :type password: ``string`` :param roles: A single role or list of roles for the user. :type roles: ``string`` or ``list`` :param params: Additional arguments (optional). For a list of available parameters, see `User authentication parameters <http://dev.splunk.com/view/SP-CAAAEJ6#userauthparams>`_ on Splunk Developer Portal. :type params: ``dict`` :return: The new user. :rtype: :class:`User` **Example**:: import splunklib.client as client users = c.users boris = users.create("boris", "securepassword", roles="user") hilda = users.create("hilda", "anotherpassword", roles=["user","power"]) """

        if not isinstance(username, basestring):
            raise ValueError("Invalid username: %s" % str(username))
        username = username.lower()
        self.post(name=username, password=password, roles=roles, **params)
        # splunkd doesn't return the user in the POST response body,
        # so we have to make a second round trip to fetch it.
        response = self.get(username)
        entry = _load_atom(response, XNAME_ENTRY).entry
        state = _parse_atom_entry(entry)
        entity = self.item(
            self.service,
            urllib.parse.unquote(state.links.alternate),
            state=state)
        return entity