code: def build_response(description, resource=None):
      
      response = swagger.Response(
          description=description,
      )
      if resource is not None:
          response.schema = swagger.JsonReference({
              "$ref": "#/definitions/{}".format(type_name(name_for(resource))),
          })
      return response
docs: Build a response definition.