<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

def remove(self, obj, safe=None):
		'''
			Remove a particular object from the database.  If the object has
			no mongo ID set, the method just returns.  If this is a partial
			document without the mongo ID field retrieved a ``FieldNotRetrieved``
			will be raised

			:param obj: the object to save
			:param safe: whether to wait for the operation to complete.  Defaults \
				to the session's ``safe`` value.
		'''
		if safe is None:
			safe = self.safe
		remove = RemoveDocumentOp(self.transaction_id, self, obj, safe)
		self.queue.append(remove)
		if self.autoflush:
			return self.flush()