<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def extend(self, *schema_items, **kwargs):
 """ Add any number of schema items to a new schema. Takes the same arguments as the constructor, and returns a new L{Schema} instance. If parameters, result, or errors is specified, they will be merged with the existing parameters, result, or errors. """

        new_kwargs = {
            'name': self.name,
            'doc': self.doc,
            'parameters': self._parameters[:],
            'result': self.result.copy() if self.result else {},
            'errors': self.errors.copy() if self.errors else set()}
        if 'parameters' in kwargs:
            new_params = kwargs.pop('parameters')
            new_kwargs['parameters'].extend(new_params)
        new_kwargs['result'].update(kwargs.pop('result', {}))
        new_kwargs['errors'].update(kwargs.pop('errors', set()))
        new_kwargs.update(kwargs)

        if schema_items:
            parameters = self._convert_old_schema(schema_items)
            new_kwargs['parameters'].extend(parameters)
        return Schema(**new_kwargs)