code: def field_set(doc, field, value):
          
          if value is None:
              doc.__delitem__(field)
          else:
              doc[field] = value
docs: Sets or replaces a value for a field in a locally cached Document
          object.  To remove the field set the ``value`` to None.
  
          :param Document doc: Locally cached Document object that can be a
              Document, DesignDocument or dict.
          :param str field: Name of the field to set.
          :param value: Value to set the field to.