code: def _serialize(self, value, key, obj):
          
          param_values = {}
          for name, attr_tpl in iteritems(self.params):
              attr_name = _tpl(str(attr_tpl))
              if attr_name:
                  attribute_value = _get_value(obj, attr_name, default=missing)
                  if attribute_value is None:
                      return None
                  if attribute_value is not missing:
                      param_values[name] = attribute_value
                  else:
                      raise AttributeError(
                          "{attr_name!r} is not a valid "
                          "attribute of {obj!r}".format(attr_name=attr_name, obj=obj)
                      )
              else:
                  param_values[name] = attr_tpl
          return url_for(self.endpoint, **param_values)
docs: Output the URL for the endpoint, given the kwargs passed to
          ``__init__``.