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

def type_list(self, index_name):
        '''
        List the types available in an index
        '''
        request = self.session
        url = 'http://%s:%s/%s/_mapping' % (self.host, self.port, index_name)
        response = request.get(url)
        if request.status_code == 200:
            return response[index_name].keys()
        else:
            return response