code: def encode_id_header(resource):
      
      if not hasattr(resource, "id"):
          return {}
  
      return {
          "X-{}-Id".format(
              camelize(name_for(resource))
          ): str(resource.id),
      }
docs: Generate a header for a newly created resource.
  
      Assume `id` attribute convention.