<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def create_index(self, index, index_type=GEO2D):
 """Create an index on a given attribute :param str index: Attribute to set index on :param str index_type: See PyMongo index types for further information, defaults to GEO2D index. """

        self.logger.info("Adding %s index to stores on attribute: %s" % (index_type, index))
        yield self.collection.create_index([(index, index_type)])