<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_object(self, obj):
 """Remove current object from the ElasticSearch."""

        obj_id = self.generate_id(obj)
        es_obj = self.document_class.get(obj_id, ignore=[404])
        # Object may not exist in this index.
        if es_obj:
            es_obj.delete(refresh=True)