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

def _aws_model_ref_from_swagger_ref(self, r):
        '''
        Helper function to reference models created on aws apigw
        '''
        model_name = r.split('/')[-1]
        return 'https://apigateway.amazonaws.com/restapis/{0}/models/{1}'.format(self.restApiId, model_name)