def render(self, *, use_local_metadata=True):
        """
        Return a :class:`~.Field` containing the values and metadata set in the
        field.

        :param use_local_metadata: if true, the description, label and required
                                   metadata can be sourced from the field
                                   descriptor associated with this bound field.
        :type use_local_metadata: :class:`bool`
        :return: A new :class:`~.Field` instance.

        The returned object uses the values accessible through this object;
        that means, any values set for e.g. :attr:`desc` take precedence over
        the values declared at the class level. If `use_local_metadata` is
        false, values declared at the class level are not used if no local
        values are declared. This is useful when generating a reply to a form
        received by a peer, as it avoids sending a modified form.

        This method is must be overriden and is thus marked abstract. However,
        when called from a subclass, it creates the :class:`~.Field` instance
        and initialises its :attr:`~.Field.var`, :attr:`~.Field.type_`,
        :attr:`~.Field.desc`, :attr:`~.Field.required` and
        :attr:`~.Field.label` attributes and returns the result. Subclasses are
        supposed to override this method, call the base implementation through
        :func:`super` to obtain the :class:`~.Field` instance and then fill in
        the values and/or options.
        """

        result = forms_xso.Field(
            var=self.field.var,
            type_=self.field.FIELD_TYPE,
        )

        if use_local_metadata:
            result.desc = self.desc
            result.label = self.label
            result.required = self.required
        else:
            try:
                result.desc = self._desc
            except AttributeError:
                pass

            try:
                result.label = self._label
            except AttributeError:
                pass

            try:
                result.required = self._required
            except AttributeError:
                pass

        return result
Return a :class:`~.Field` containing the values and metadata set in the
        field.

        :param use_local_metadata: if true, the description, label and required
                                   metadata can be sourced from the field
                                   descriptor associated with this bound field.
        :type use_local_metadata: :class:`bool`
        :return: A new :class:`~.Field` instance.

        The returned object uses the values accessible through this object;
        that means, any values set for e.g. :attr:`desc` take precedence over
        the values declared at the class level. If `use_local_metadata` is
        false, values declared at the class level are not used if no local
        values are declared. This is useful when generating a reply to a form
        received by a peer, as it avoids sending a modified form.

        This method is must be overriden and is thus marked abstract. However,
        when called from a subclass, it creates the :class:`~.Field` instance
        and initialises its :attr:`~.Field.var`, :attr:`~.Field.type_`,
        :attr:`~.Field.desc`, :attr:`~.Field.required` and
        :attr:`~.Field.label` attributes and returns the result. Subclasses are
        supposed to override this method, call the base implementation through
        :func:`super` to obtain the :class:`~.Field` instance and then fill in
        the values and/or options.