<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, resource, keys_vals, url_prefix, auth, session, send_opts):
 """Create the given key-value pairs for the given resource. Will attempt to create all key-value pairs even if a failure is encountered. Args: resource (intern.resource.boss.BossResource):
 List keys associated with this resource. keys_vals (dictionary):
 The metadata to associate with the resource. url_prefix (string):
 Protocol + host such as https://api.theboss.io auth (string):
 Token to send in the request header. session (requests.Session):
 HTTP session to use for request. send_opts (dictionary):
 Additional arguments to pass to session.send(). Raises: HTTPErrorList on failure. """

        success = True
        exc = HTTPErrorList('At least one key-value create failed.')

        for pair in keys_vals.items():
            key = pair[0]
            value = pair[1]
            req = self.get_metadata_request(
                resource, 'POST', 'application/json', url_prefix, auth,
                key, value)
            prep = session.prepare_request(req)
            resp = session.send(prep, **send_opts)
            if resp.status_code == 201:
                continue

            err = (
                'Create failed for {}: {}:{}, got HTTP response: ({}) - {}'
                .format(resource.name, key, value, resp.status_code, resp.text))
            exc.http_errors.append(HTTPError(err, request=req, response=resp))
            success = False

        if not success:
            raise exc