def dumps(self, config, instance, prefer=None, **kwargs):
dumper = self._prefer_package(prefer)<EOL>dumps_hook_name = f"<STR_LIT>"<EOL>dumps_hook = getattr(self, dumps_hook_name, None)<EOL>if not callable(dumps_hook):<EOL><INDENT>raise ValueError(<EOL>f"<STR_LIT>"<EOL>f"<STR_LIT>"<EOL>)<EOL><DEDENT>extras = self.options.copy()<EOL>for (key, value) in kwargs.items():<EOL><INDENT>if key not in extras.keys():<EOL><INDENT>warnings.warn(<EOL>f"<STR_LIT>"<EOL>)<EOL><DEDENT>else:<EOL><INDENT>extras[key] = value<EOL><DEDENT><DEDENT>return dumps_hook(self.handler, config, instance, **extras)<EOL>
An abstract dumps method which dumps an instance into the subclasses format.

        :param class config: The config class of the instance
        :param object instance: The instance to dump
        :param str prefer: The preferred serialization module name
        :raises ValueError: If dump handler does not provide handler method
        :return: The dumped content
        :rtype: str