'INDEX URI template processor.'

def get_resource_uri_index(self):

    try:
        resource_uri = self.handler.resource_uri()
        components = [None, [], {}]
        for (i, value) in enumerate(resource_uri):
            components[i] = value
        (lookup_view, args, kwargs) = components
        if (args or kwargs):
            lookup_view = get_callable(lookup_view, True)
            possibilities = get_resolver('treeio.core.api.urls').reverse_dict.getlist(lookup_view)
            for (possibility, pattern) in possibilities:
                for (result, params) in possibility:
                    if (not params):
                        return _convert(result)
    except:
        return None
