def _serialize(self, value, key, obj):
param_values = {}<EOL>for name, attr_tpl in iteritems(self.params):<EOL><INDENT>attr_name = _tpl(str(attr_tpl))<EOL>if attr_name:<EOL><INDENT>attribute_value = _get_value(obj, attr_name, default=missing)<EOL>if attribute_value is None:<EOL><INDENT>return None<EOL><DEDENT>if attribute_value is not missing:<EOL><INDENT>param_values[name] = attribute_value<EOL><DEDENT>else:<EOL><INDENT>raise AttributeError(<EOL>"<STR_LIT>"<EOL>"<STR_LIT>".format(attr_name=attr_name, obj=obj)<EOL>)<EOL><DEDENT><DEDENT>else:<EOL><INDENT>param_values[name] = attr_tpl<EOL><DEDENT><DEDENT>return url_for(self.endpoint, **param_values)<EOL>
Output the URL for the endpoint, given the kwargs passed to
        ``__init__``.