Commit a staged import.

        :param id: Staged import ID as an int.
        :param impreq: :class:`imports.Request <imports.Request>` object
        :return: :class:`imports.Request <imports.Request>` object
        :rtype: imports.Request

def commit(self, id, impreq): # pylint: disable=invalid-name,redefined-builtin
        """Commit a staged import.

        :param id: Staged import ID as an int.
        :param impreq: :class:`imports.Request <imports.Request>` object
        :return: :class:`imports.Request <imports.Request>` object
        :rtype: imports.Request
        """
        schema = RequestSchema()
        json = self.service.encode(schema, impreq)

        schema = RequestSchema()
        resp = self.service.post(self.base+str(id)+'/', json=json)
        return self.service.decode(schema, resp)