<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def set_index(self, schema, name, fields, **index_options):
 """ add an index to the table schema -- Schema() name -- string -- the name of the index fields -- array -- the fields the index should be on **index_options -- dict -- any index options that might be useful to create the index """

        with self.transaction(**index_options) as connection:
            index_options['connection'] = connection
            self._set_index(schema, name, fields, **index_options)

        return True